import java.util.Scanner;

class Main {
	public static void main(String[] $) {
		Scanner sc = new Scanner(System.in);
		String s=sc.next();
		int count0=0,count1=0;
		for(int i=0;i<s.length();i++) {
			if(s.substring(i,i+1).equals("0"))count0++;
			else count1++;
		}
		System.out.println((int)Math.min(count0, count1)*2);
	}
}
 import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] $) {
		Scanner sc = new Scanner(System.in);
		String s=sc.next();
		int count0=0,count1=0;
		for(int i=0;i<s.length();i++) {
			if(s.substring(i,i+1).equals("0"))count0++;
			else count1++;
		}
		System.out.println((int)Math.min(count0, count1)*2);
	}
} Main public static void main(String[] $) {
		Scanner sc = new Scanner(System.in);
		String s=sc.next();
		int count0=0,count1=0;
		for(int i=0;i<s.length();i++) {
			if(s.substring(i,i+1).equals("0"))count0++;
			else count1++;
		}
		System.out.println((int)Math.min(count0, count1)*2);
	} main {
		Scanner sc = new Scanner(System.in);
		String s=sc.next();
		int count0=0,count1=0;
		for(int i=0;i<s.length();i++) {
			if(s.substring(i,i+1).equals("0"))count0++;
			else count1++;
		}
		System.out.println((int)Math.min(count0, count1)*2);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s=sc.next(); s sc.next() sc.next sc int count0=0 count0 0 count1=0; count1 0 for(int i=0;i<s.length();i++) {
			if(s.substring(i,i+1).equals("0"))count0++;
			else count1++;
		} int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
			if(s.substring(i,i+1).equals("0"))count0++;
			else count1++;
		} {
			if(s.substring(i,i+1).equals("0"))count0++;
			else count1++;
		} if(s.substring(i,i+1).equals("0"))count0++;
			else count1++; s.substring(i,i+1).equals("0") s.substring(i,i+1).equals s.substring(i,i+1) s.substring s i i+1 i 1 "0" count0++ count0 count1++ count1 System.out.println((int)Math.min(count0, count1)*2) System.out.println System.out System System.out (int)Math.min(count0, count1)*2 (int)Math.min(count0, count1) Math.min Math count0 count1 2 String[] $ $
import java.util.Scanner;

class Main {
	public static void main(String[] $) {
		Scanner sc = new Scanner(System.in);
		String s=sc.next();
		int count0=0,count1=0;
		for(int i=0;i<s.length();i++) {
			if(s.substring(i,i+1).equals("0"))count0++;
			else count1++;
		}
		System.out.println((int)Math.min(count0, count1)*2);
	}
}

