import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
    	Scanner input = new Scanner(System.in);
      	String S = input.next();
      	int A = countOf(S, '0');
      	int B = countOf(S, '1');
      
      	if (A > B) {
        	int tmp = B;
          	A = B;
          	B = A;
        }
      	
      System.out.print(A * 2);

    }
  static int countOf(String str, char target){
	int count = 0;

	for(char x: str.toCharArray()){
		if(x == target){
			count++;
		}
	}

	return count;
}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
    	Scanner input = new Scanner(System.in);
      	String S = input.next();
      	int A = countOf(S, '0');
      	int B = countOf(S, '1');
      
      	if (A > B) {
        	int tmp = B;
          	A = B;
          	B = A;
        }
      	
      System.out.print(A * 2);

    }
  static int countOf(String str, char target){
	int count = 0;

	for(char x: str.toCharArray()){
		if(x == target){
			count++;
		}
	}

	return count;
}
} Main public static void main(String[] args) {
    	Scanner input = new Scanner(System.in);
      	String S = input.next();
      	int A = countOf(S, '0');
      	int B = countOf(S, '1');
      
      	if (A > B) {
        	int tmp = B;
          	A = B;
          	B = A;
        }
      	
      System.out.print(A * 2);

    } main {
    	Scanner input = new Scanner(System.in);
      	String S = input.next();
      	int A = countOf(S, '0');
      	int B = countOf(S, '1');
      
      	if (A > B) {
        	int tmp = B;
          	A = B;
          	B = A;
        }
      	
      System.out.print(A * 2);

    } Scanner input = new Scanner(System.in); input new Scanner(System.in) String S = input.next(); S input.next() input.next input int A = countOf(S, '0'); A countOf(S, '0') countOf S '0' int B = countOf(S, '1'); B countOf(S, '1') countOf S '1' if (A > B) {
        	int tmp = B;
          	A = B;
          	B = A;
        } A > B A B {
        	int tmp = B;
          	A = B;
          	B = A;
        } int tmp = B; tmp B A = B A B B = A B A System.out.print(A * 2) System.out.print System.out System System.out A * 2 A 2 String[] args args static int countOf(String str, char target){
	int count = 0;

	for(char x: str.toCharArray()){
		if(x == target){
			count++;
		}
	}

	return count;
} countOf {
	int count = 0;

	for(char x: str.toCharArray()){
		if(x == target){
			count++;
		}
	}

	return count;
} int count = 0; count 0 for(char x: str.toCharArray()){
		if(x == target){
			count++;
		}
	} char x str.toCharArray() str.toCharArray str {
		if(x == target){
			count++;
		}
	} {
		if(x == target){
			count++;
		}
	} if(x == target){
			count++;
		} x == target x target {
			count++;
		} count++ count return count; count String str str char target target public class Main {
	public static void main(String[] args) {
    	Scanner input = new Scanner(System.in);
      	String S = input.next();
      	int A = countOf(S, '0');
      	int B = countOf(S, '1');
      
      	if (A > B) {
        	int tmp = B;
          	A = B;
          	B = A;
        }
      	
      System.out.print(A * 2);

    }
  static int countOf(String str, char target){
	int count = 0;

	for(char x: str.toCharArray()){
		if(x == target){
			count++;
		}
	}

	return count;
}
} public class Main {
	public static void main(String[] args) {
    	Scanner input = new Scanner(System.in);
      	String S = input.next();
      	int A = countOf(S, '0');
      	int B = countOf(S, '1');
      
      	if (A > B) {
        	int tmp = B;
          	A = B;
          	B = A;
        }
      	
      System.out.print(A * 2);

    }
  static int countOf(String str, char target){
	int count = 0;

	for(char x: str.toCharArray()){
		if(x == target){
			count++;
		}
	}

	return count;
}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
    	Scanner input = new Scanner(System.in);
      	String S = input.next();
      	int A = countOf(S, '0');
      	int B = countOf(S, '1');
      
      	if (A > B) {
        	int tmp = B;
          	A = B;
          	B = A;
        }
      	
      System.out.print(A * 2);

    }
  static int countOf(String str, char target){
	int count = 0;

	for(char x: str.toCharArray()){
		if(x == target){
			count++;
		}
	}

	return count;
}
}
