
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		int c0 = 0, c1 = 0;
		String str = null;
		Scanner scan = new Scanner(System.in);
		str = scan.nextLine();
		
		for(int i = 0;i < str.length();i++){
			String s = str.substring(i, i+1);
			if(s.equals("0"))c0++;
			else c1++;
		}
		
		scan.close();
		if(c0 < c1)System.out.println(c0*2);
		else System.out.println(c1*2);
		
	}
	
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		int c0 = 0, c1 = 0;
		String str = null;
		Scanner scan = new Scanner(System.in);
		str = scan.nextLine();
		
		for(int i = 0;i < str.length();i++){
			String s = str.substring(i, i+1);
			if(s.equals("0"))c0++;
			else c1++;
		}
		
		scan.close();
		if(c0 < c1)System.out.println(c0*2);
		else System.out.println(c1*2);
		
	}
	
} Main public static void main(String[] args) {
		int c0 = 0, c1 = 0;
		String str = null;
		Scanner scan = new Scanner(System.in);
		str = scan.nextLine();
		
		for(int i = 0;i < str.length();i++){
			String s = str.substring(i, i+1);
			if(s.equals("0"))c0++;
			else c1++;
		}
		
		scan.close();
		if(c0 < c1)System.out.println(c0*2);
		else System.out.println(c1*2);
		
	} main {
		int c0 = 0, c1 = 0;
		String str = null;
		Scanner scan = new Scanner(System.in);
		str = scan.nextLine();
		
		for(int i = 0;i < str.length();i++){
			String s = str.substring(i, i+1);
			if(s.equals("0"))c0++;
			else c1++;
		}
		
		scan.close();
		if(c0 < c1)System.out.println(c0*2);
		else System.out.println(c1*2);
		
	} int c0 = 0 c0 0 c1 = 0; c1 0 String str = null; str null Scanner scan = new Scanner(System.in); scan new Scanner(System.in) str = scan.nextLine() str scan.nextLine() scan.nextLine scan for(int i = 0;i < str.length();i++){
			String s = str.substring(i, i+1);
			if(s.equals("0"))c0++;
			else c1++;
		} int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
			String s = str.substring(i, i+1);
			if(s.equals("0"))c0++;
			else c1++;
		} {
			String s = str.substring(i, i+1);
			if(s.equals("0"))c0++;
			else c1++;
		} String s = str.substring(i, i+1); s str.substring(i, i+1) str.substring str i i+1 i 1 if(s.equals("0"))c0++;
			else c1++; s.equals("0") s.equals s "0" c0++ c0 c1++ c1 scan.close() scan.close scan if(c0 < c1)System.out.println(c0*2);
		else System.out.println(c1*2); c0 < c1 c0 c1 System.out.println(c0*2) System.out.println System.out System System.out c0*2 c0 2 System.out.println(c1*2) System.out.println System.out System System.out c1*2 c1 2 String[] args args public class Main {
	public static void main(String[] args) {
		int c0 = 0, c1 = 0;
		String str = null;
		Scanner scan = new Scanner(System.in);
		str = scan.nextLine();
		
		for(int i = 0;i < str.length();i++){
			String s = str.substring(i, i+1);
			if(s.equals("0"))c0++;
			else c1++;
		}
		
		scan.close();
		if(c0 < c1)System.out.println(c0*2);
		else System.out.println(c1*2);
		
	}
	
} public class Main {
	public static void main(String[] args) {
		int c0 = 0, c1 = 0;
		String str = null;
		Scanner scan = new Scanner(System.in);
		str = scan.nextLine();
		
		for(int i = 0;i < str.length();i++){
			String s = str.substring(i, i+1);
			if(s.equals("0"))c0++;
			else c1++;
		}
		
		scan.close();
		if(c0 < c1)System.out.println(c0*2);
		else System.out.println(c1*2);
		
	}
	
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		int c0 = 0, c1 = 0;
		String str = null;
		Scanner scan = new Scanner(System.in);
		str = scan.nextLine();
		
		for(int i = 0;i < str.length();i++){
			String s = str.substring(i, i+1);
			if(s.equals("0"))c0++;
			else c1++;
		}
		
		scan.close();
		if(c0 < c1)System.out.println(c0*2);
		else System.out.println(c1*2);
		
	}
	
}