import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int cnt_zero = 0, cnt_one = 0;
		for(int i = 0; i < S.length(); i++) {
			if(S.charAt(i) == '0') cnt_zero++;
			else cnt_one++;
		}
		System.out.println(2 * Math.min(cnt_zero, cnt_one));
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int cnt_zero = 0, cnt_one = 0;
		for(int i = 0; i < S.length(); i++) {
			if(S.charAt(i) == '0') cnt_zero++;
			else cnt_one++;
		}
		System.out.println(2 * Math.min(cnt_zero, cnt_one));
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int cnt_zero = 0, cnt_one = 0;
		for(int i = 0; i < S.length(); i++) {
			if(S.charAt(i) == '0') cnt_zero++;
			else cnt_one++;
		}
		System.out.println(2 * Math.min(cnt_zero, cnt_one));
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int cnt_zero = 0, cnt_one = 0;
		for(int i = 0; i < S.length(); i++) {
			if(S.charAt(i) == '0') cnt_zero++;
			else cnt_one++;
		}
		System.out.println(2 * Math.min(cnt_zero, cnt_one));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int cnt_zero = 0 cnt_zero 0 cnt_one = 0; cnt_one 0 for(int i = 0; i < S.length(); i++) {
			if(S.charAt(i) == '0') cnt_zero++;
			else cnt_one++;
		} 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') cnt_zero++;
			else cnt_one++;
		} {
			if(S.charAt(i) == '0') cnt_zero++;
			else cnt_one++;
		} if(S.charAt(i) == '0') cnt_zero++;
			else cnt_one++; S.charAt(i) == '0' S.charAt(i) S.charAt S i '0' cnt_zero++ cnt_zero cnt_one++ cnt_one System.out.println(2 * Math.min(cnt_zero, cnt_one)) System.out.println System.out System System.out 2 * Math.min(cnt_zero, cnt_one) 2 Math.min(cnt_zero, cnt_one) Math.min Math cnt_zero cnt_one String[] args args
import java.util.Scanner;

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