import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String[]strArray = new String[s.length()];
		
		int zero=0;
		int one=0;
		
		for(int i=0;i<s.length(); i++) {
			strArray[i]=String.valueOf(s.charAt(i));
		}
		
		for(int i=0; i<s.length(); i++) {
			if(strArray[i].equals("0"))  zero++;			
			else 	one++;
		}
		if(zero<=one) System.out.println(zero*2);
		else System.out.println(one*2);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String args[]) {
		
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String[]strArray = new String[s.length()];
		
		int zero=0;
		int one=0;
		
		for(int i=0;i<s.length(); i++) {
			strArray[i]=String.valueOf(s.charAt(i));
		}
		
		for(int i=0; i<s.length(); i++) {
			if(strArray[i].equals("0"))  zero++;			
			else 	one++;
		}
		if(zero<=one) System.out.println(zero*2);
		else System.out.println(one*2);
	}
} Main public static void main(String args[]) {
		
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String[]strArray = new String[s.length()];
		
		int zero=0;
		int one=0;
		
		for(int i=0;i<s.length(); i++) {
			strArray[i]=String.valueOf(s.charAt(i));
		}
		
		for(int i=0; i<s.length(); i++) {
			if(strArray[i].equals("0"))  zero++;			
			else 	one++;
		}
		if(zero<=one) System.out.println(zero*2);
		else System.out.println(one*2);
	} main {
		
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String[]strArray = new String[s.length()];
		
		int zero=0;
		int one=0;
		
		for(int i=0;i<s.length(); i++) {
			strArray[i]=String.valueOf(s.charAt(i));
		}
		
		for(int i=0; i<s.length(); i++) {
			if(strArray[i].equals("0"))  zero++;			
			else 	one++;
		}
		if(zero<=one) System.out.println(zero*2);
		else System.out.println(one*2);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc String[]strArray = new String[s.length()]; strArray new String[s.length()] s.length() s.length s int zero=0; zero 0 int one=0; one 0 for(int i=0;i<s.length(); i++) {
			strArray[i]=String.valueOf(s.charAt(i));
		} int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
			strArray[i]=String.valueOf(s.charAt(i));
		} {
			strArray[i]=String.valueOf(s.charAt(i));
		} strArray[i]=String.valueOf(s.charAt(i)) strArray[i] strArray i String.valueOf(s.charAt(i)) String.valueOf String s.charAt(i) s.charAt s i for(int i=0; i<s.length(); i++) {
			if(strArray[i].equals("0"))  zero++;			
			else 	one++;
		} int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
			if(strArray[i].equals("0"))  zero++;			
			else 	one++;
		} {
			if(strArray[i].equals("0"))  zero++;			
			else 	one++;
		} if(strArray[i].equals("0"))  zero++;			
			else 	one++; strArray[i].equals("0") strArray[i].equals strArray[i] strArray i "0" zero++ zero one++ one if(zero<=one) System.out.println(zero*2);
		else System.out.println(one*2); zero<=one zero one System.out.println(zero*2) System.out.println System.out System System.out zero*2 zero 2 System.out.println(one*2) System.out.println System.out System System.out one*2 one 2 String args[] args public class Main {
	public static void main(String args[]) {
		
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String[]strArray = new String[s.length()];
		
		int zero=0;
		int one=0;
		
		for(int i=0;i<s.length(); i++) {
			strArray[i]=String.valueOf(s.charAt(i));
		}
		
		for(int i=0; i<s.length(); i++) {
			if(strArray[i].equals("0"))  zero++;			
			else 	one++;
		}
		if(zero<=one) System.out.println(zero*2);
		else System.out.println(one*2);
	}
} public class Main {
	public static void main(String args[]) {
		
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String[]strArray = new String[s.length()];
		
		int zero=0;
		int one=0;
		
		for(int i=0;i<s.length(); i++) {
			strArray[i]=String.valueOf(s.charAt(i));
		}
		
		for(int i=0; i<s.length(); i++) {
			if(strArray[i].equals("0"))  zero++;			
			else 	one++;
		}
		if(zero<=one) System.out.println(zero*2);
		else System.out.println(one*2);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String[]strArray = new String[s.length()];
		
		int zero=0;
		int one=0;
		
		for(int i=0;i<s.length(); i++) {
			strArray[i]=String.valueOf(s.charAt(i));
		}
		
		for(int i=0; i<s.length(); i++) {
			if(strArray[i].equals("0"))  zero++;			
			else 	one++;
		}
		if(zero<=one) System.out.println(zero*2);
		else System.out.println(one*2);
	}
}
