import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.next();
		int[] count = new int[2];
		for(int i=0;i<s.length();i++) {
			if(s.charAt(i)=='0') count[0]++;
			else count[1]++;
		}
		System.out.println(Math.min(count[0], count[1])*2);
		in.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.next();
		int[] count = new int[2];
		for(int i=0;i<s.length();i++) {
			if(s.charAt(i)=='0') count[0]++;
			else count[1]++;
		}
		System.out.println(Math.min(count[0], count[1])*2);
		in.close();
	}

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

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.next();
		int[] count = new int[2];
		for(int i=0;i<s.length();i++) {
			if(s.charAt(i)=='0') count[0]++;
			else count[1]++;
		}
		System.out.println(Math.min(count[0], count[1])*2);
		in.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.next();
		int[] count = new int[2];
		for(int i=0;i<s.length();i++) {
			if(s.charAt(i)=='0') count[0]++;
			else count[1]++;
		}
		System.out.println(Math.min(count[0], count[1])*2);
		in.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.next();
		int[] count = new int[2];
		for(int i=0;i<s.length();i++) {
			if(s.charAt(i)=='0') count[0]++;
			else count[1]++;
		}
		System.out.println(Math.min(count[0], count[1])*2);
		in.close();
	}

}
