import java.util.Scanner;

public class Main {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		char[] array = sc.next().toCharArray();
		int onecount=0;
		int zerocount=0;
		for(int i=0;i<array.length;i++) {
			if(array[i]=='1') onecount++;
			else zerocount++;
		}
		System.out.println(Math.min(zerocount,onecount)*2);
		}
} import java.util.Scanner; Scanner java.util public class Main {

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

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

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		char[] array = sc.next().toCharArray();
		int onecount=0;
		int zerocount=0;
		for(int i=0;i<array.length;i++) {
			if(array[i]=='1') onecount++;
			else zerocount++;
		}
		System.out.println(Math.min(zerocount,onecount)*2);
		}
} Main
import java.util.Scanner;

public class Main {

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