import java.util.Scanner;
public class Main {

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

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

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

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

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

} public class Main {

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

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

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

}
