import java.util.Scanner;
public class Main {
	static int A,B,C;
	static String S;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long ans=0;
		int zero=0;
		int one=0;
	S=sc.nextLine();
	String s[]=S.split("");
	for(int i=0;i<S.length();i++) {
		if(s[i].equals("0")) {
			zero++;
		}else {
			one++;
		}
	}
ans=Math.min(zero, one);
ans*=2;
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	static int A,B,C;
	static String S;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long ans=0;
		int zero=0;
		int one=0;
	S=sc.nextLine();
	String s[]=S.split("");
	for(int i=0;i<S.length();i++) {
		if(s[i].equals("0")) {
			zero++;
		}else {
			one++;
		}
	}
ans=Math.min(zero, one);
ans*=2;
		System.out.println(ans);
	}
} Main static int A A B B C; C static String S; S public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long ans=0;
		int zero=0;
		int one=0;
	S=sc.nextLine();
	String s[]=S.split("");
	for(int i=0;i<S.length();i++) {
		if(s[i].equals("0")) {
			zero++;
		}else {
			one++;
		}
	}
ans=Math.min(zero, one);
ans*=2;
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		long ans=0;
		int zero=0;
		int one=0;
	S=sc.nextLine();
	String s[]=S.split("");
	for(int i=0;i<S.length();i++) {
		if(s[i].equals("0")) {
			zero++;
		}else {
			one++;
		}
	}
ans=Math.min(zero, one);
ans*=2;
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long ans=0; ans 0 int zero=0; zero 0 int one=0; one 0 S=sc.nextLine() S sc.nextLine() sc.nextLine sc String s[]=S.split(""); s S.split("") S.split S "" for(int i=0;i<S.length();i++) {
		if(s[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(s[i].equals("0")) {
			zero++;
		}else {
			one++;
		}
	} {
		if(s[i].equals("0")) {
			zero++;
		}else {
			one++;
		}
	} if(s[i].equals("0")) {
			zero++;
		}else {
			one++;
		} s[i].equals("0") s[i].equals s[i] s i "0" {
			zero++;
		} zero++ zero {
			one++;
		} one++ one ans=Math.min(zero, one) ans Math.min(zero, one) Math.min Math zero one ans*=2 ans 2 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	static int A,B,C;
	static String S;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long ans=0;
		int zero=0;
		int one=0;
	S=sc.nextLine();
	String s[]=S.split("");
	for(int i=0;i<S.length();i++) {
		if(s[i].equals("0")) {
			zero++;
		}else {
			one++;
		}
	}
ans=Math.min(zero, one);
ans*=2;
		System.out.println(ans);
	}
} public class Main {
	static int A,B,C;
	static String S;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long ans=0;
		int zero=0;
		int one=0;
	S=sc.nextLine();
	String s[]=S.split("");
	for(int i=0;i<S.length();i++) {
		if(s[i].equals("0")) {
			zero++;
		}else {
			one++;
		}
	}
ans=Math.min(zero, one);
ans*=2;
		System.out.println(ans);
	}
} Main
import java.util.Scanner;
public class Main {
	static int A,B,C;
	static String S;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long ans=0;
		int zero=0;
		int one=0;
	S=sc.nextLine();
	String s[]=S.split("");
	for(int i=0;i<S.length();i++) {
		if(s[i].equals("0")) {
			zero++;
		}else {
			one++;
		}
	}
ans=Math.min(zero, one);
ans*=2;
		System.out.println(ans);
	}
}
