import java.util.Scanner;

public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			
			
			String S = scan.next();
			char[] c = new char[S.length()];
			c = S.toCharArray();
			int count = 0;
			int c0 = 0;
			int c1 = 0;
			
			for(int i = 0;i<S.length();i++) {
				if(c[i]=='0')c0++;
				if(c[i]=='1')c1++;
			}
			
			
			System.out.println(2*Math.min(c0, c1));
			
			
		}	
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			
			
			String S = scan.next();
			char[] c = new char[S.length()];
			c = S.toCharArray();
			int count = 0;
			int c0 = 0;
			int c1 = 0;
			
			for(int i = 0;i<S.length();i++) {
				if(c[i]=='0')c0++;
				if(c[i]=='1')c1++;
			}
			
			
			System.out.println(2*Math.min(c0, c1));
			
			
		}	
	}
} Main public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			
			
			String S = scan.next();
			char[] c = new char[S.length()];
			c = S.toCharArray();
			int count = 0;
			int c0 = 0;
			int c1 = 0;
			
			for(int i = 0;i<S.length();i++) {
				if(c[i]=='0')c0++;
				if(c[i]=='1')c1++;
			}
			
			
			System.out.println(2*Math.min(c0, c1));
			
			
		}	
	} main {
		try(Scanner scan = new Scanner(System.in)){
			
			
			String S = scan.next();
			char[] c = new char[S.length()];
			c = S.toCharArray();
			int count = 0;
			int c0 = 0;
			int c1 = 0;
			
			for(int i = 0;i<S.length();i++) {
				if(c[i]=='0')c0++;
				if(c[i]=='1')c1++;
			}
			
			
			System.out.println(2*Math.min(c0, c1));
			
			
		}	
	} try(Scanner scan = new Scanner(System.in)){
			
			
			String S = scan.next();
			char[] c = new char[S.length()];
			c = S.toCharArray();
			int count = 0;
			int c0 = 0;
			int c1 = 0;
			
			for(int i = 0;i<S.length();i++) {
				if(c[i]=='0')c0++;
				if(c[i]=='1')c1++;
			}
			
			
			System.out.println(2*Math.min(c0, c1));
			
			
		} {
			
			
			String S = scan.next();
			char[] c = new char[S.length()];
			c = S.toCharArray();
			int count = 0;
			int c0 = 0;
			int c1 = 0;
			
			for(int i = 0;i<S.length();i++) {
				if(c[i]=='0')c0++;
				if(c[i]=='1')c1++;
			}
			
			
			System.out.println(2*Math.min(c0, c1));
			
			
		} Scanner scan = new Scanner(System.in) Scanner scan = new Scanner(System.in) new Scanner(System.in) String S = scan.next(); S scan.next() scan.next scan char[] c = new char[S.length()]; c new char[S.length()] S.length() S.length S c = S.toCharArray() c S.toCharArray() S.toCharArray S int count = 0; count 0 int c0 = 0; c0 0 int c1 = 0; c1 0 for(int i = 0;i<S.length();i++) {
				if(c[i]=='0')c0++;
				if(c[i]=='1')c1++;
			} int i = 0; int i = 0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
				if(c[i]=='0')c0++;
				if(c[i]=='1')c1++;
			} {
				if(c[i]=='0')c0++;
				if(c[i]=='1')c1++;
			} if(c[i]=='0')c0++; c[i]=='0' c[i] c i '0' c0++ c0 if(c[i]=='1')c1++; c[i]=='1' c[i] c i '1' c1++ c1 System.out.println(2*Math.min(c0, c1)) System.out.println System.out System System.out 2*Math.min(c0, c1) 2 Math.min(c0, c1) Math.min Math c0 c1 String[]args args public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			
			
			String S = scan.next();
			char[] c = new char[S.length()];
			c = S.toCharArray();
			int count = 0;
			int c0 = 0;
			int c1 = 0;
			
			for(int i = 0;i<S.length();i++) {
				if(c[i]=='0')c0++;
				if(c[i]=='1')c1++;
			}
			
			
			System.out.println(2*Math.min(c0, c1));
			
			
		}	
	}
} public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			
			
			String S = scan.next();
			char[] c = new char[S.length()];
			c = S.toCharArray();
			int count = 0;
			int c0 = 0;
			int c1 = 0;
			
			for(int i = 0;i<S.length();i++) {
				if(c[i]=='0')c0++;
				if(c[i]=='1')c1++;
			}
			
			
			System.out.println(2*Math.min(c0, c1));
			
			
		}	
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			
			
			String S = scan.next();
			char[] c = new char[S.length()];
			c = S.toCharArray();
			int count = 0;
			int c0 = 0;
			int c1 = 0;
			
			for(int i = 0;i<S.length();i++) {
				if(c[i]=='0')c0++;
				if(c[i]=='1')c1++;
			}
			
			
			System.out.println(2*Math.min(c0, c1));
			
			
		}	
	}
}
