import java.util.Scanner;


public class Main {
	public static void main(String[] args) {
		new Main().solve(new Scanner(System.in));
	}

	public void solve(Scanner sc) {
		String s = sc.next();
		
		int red = 0, blue = 0;
		for(int i=0; i<s.length(); i++) {
			char chr = s.charAt(i);
			if(chr =='0') {
				red++;
			} else {
				blue++;
			}
		}
		
		
		System.out.println(Math.min(red, blue) * 2);
		
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		new Main().solve(new Scanner(System.in));
	}

	public void solve(Scanner sc) {
		String s = sc.next();
		
		int red = 0, blue = 0;
		for(int i=0; i<s.length(); i++) {
			char chr = s.charAt(i);
			if(chr =='0') {
				red++;
			} else {
				blue++;
			}
		}
		
		
		System.out.println(Math.min(red, blue) * 2);
		
	}
} Main public static void main(String[] args) {
		new Main().solve(new Scanner(System.in));
	} main {
		new Main().solve(new Scanner(System.in));
	} new Main().solve(new Scanner(System.in)) new Main().solve new Main() new Scanner(System.in) String[] args args public void solve(Scanner sc) {
		String s = sc.next();
		
		int red = 0, blue = 0;
		for(int i=0; i<s.length(); i++) {
			char chr = s.charAt(i);
			if(chr =='0') {
				red++;
			} else {
				blue++;
			}
		}
		
		
		System.out.println(Math.min(red, blue) * 2);
		
	} solve {
		String s = sc.next();
		
		int red = 0, blue = 0;
		for(int i=0; i<s.length(); i++) {
			char chr = s.charAt(i);
			if(chr =='0') {
				red++;
			} else {
				blue++;
			}
		}
		
		
		System.out.println(Math.min(red, blue) * 2);
		
	} String s = sc.next(); s sc.next() sc.next sc int red = 0 red 0 blue = 0; blue 0 for(int i=0; i<s.length(); i++) {
			char chr = s.charAt(i);
			if(chr =='0') {
				red++;
			} else {
				blue++;
			}
		} int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
			char chr = s.charAt(i);
			if(chr =='0') {
				red++;
			} else {
				blue++;
			}
		} {
			char chr = s.charAt(i);
			if(chr =='0') {
				red++;
			} else {
				blue++;
			}
		} char chr = s.charAt(i); chr s.charAt(i) s.charAt s i if(chr =='0') {
				red++;
			} else {
				blue++;
			} chr =='0' chr '0' {
				red++;
			} red++ red {
				blue++;
			} blue++ blue System.out.println(Math.min(red, blue) * 2) System.out.println System.out System System.out Math.min(red, blue) * 2 Math.min(red, blue) Math.min Math red blue 2 Scanner sc sc public class Main {
	public static void main(String[] args) {
		new Main().solve(new Scanner(System.in));
	}

	public void solve(Scanner sc) {
		String s = sc.next();
		
		int red = 0, blue = 0;
		for(int i=0; i<s.length(); i++) {
			char chr = s.charAt(i);
			if(chr =='0') {
				red++;
			} else {
				blue++;
			}
		}
		
		
		System.out.println(Math.min(red, blue) * 2);
		
	}
} public class Main {
	public static void main(String[] args) {
		new Main().solve(new Scanner(System.in));
	}

	public void solve(Scanner sc) {
		String s = sc.next();
		
		int red = 0, blue = 0;
		for(int i=0; i<s.length(); i++) {
			char chr = s.charAt(i);
			if(chr =='0') {
				red++;
			} else {
				blue++;
			}
		}
		
		
		System.out.println(Math.min(red, blue) * 2);
		
	}
} Main
import java.util.Scanner;


public class Main {
	public static void main(String[] args) {
		new Main().solve(new Scanner(System.in));
	}

	public void solve(Scanner sc) {
		String s = sc.next();
		
		int red = 0, blue = 0;
		for(int i=0; i<s.length(); i++) {
			char chr = s.charAt(i);
			if(chr =='0') {
				red++;
			} else {
				blue++;
			}
		}
		
		
		System.out.println(Math.min(red, blue) * 2);
		
	}
}
