import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        char[] inputs = line.toCharArray();
        
        int red = 0, yellow = 0;
        for(char c : inputs) {
            if(c == '0') red++;
            else yellow++;
        }
        int ans = Math.min(red, yellow)*2;

		System.out.println(ans);
	}
} import java.util.*; util.* java class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        char[] inputs = line.toCharArray();
        
        int red = 0, yellow = 0;
        for(char c : inputs) {
            if(c == '0') red++;
            else yellow++;
        }
        int ans = Math.min(red, yellow)*2;

		System.out.println(ans);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        char[] inputs = line.toCharArray();
        
        int red = 0, yellow = 0;
        for(char c : inputs) {
            if(c == '0') red++;
            else yellow++;
        }
        int ans = Math.min(red, yellow)*2;

		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        char[] inputs = line.toCharArray();
        
        int red = 0, yellow = 0;
        for(char c : inputs) {
            if(c == '0') red++;
            else yellow++;
        }
        int ans = Math.min(red, yellow)*2;

		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc char[] inputs = line.toCharArray(); inputs line.toCharArray() line.toCharArray line int red = 0 red 0 yellow = 0; yellow 0 for(char c : inputs) {
            if(c == '0') red++;
            else yellow++;
        } char c inputs {
            if(c == '0') red++;
            else yellow++;
        } {
            if(c == '0') red++;
            else yellow++;
        } if(c == '0') red++;
            else yellow++; c == '0' c '0' red++ red yellow++ yellow int ans = Math.min(red, yellow)*2; ans Math.min(red, yellow)*2 Math.min(red, yellow) Math.min Math red yellow 2 System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        char[] inputs = line.toCharArray();
        
        int red = 0, yellow = 0;
        for(char c : inputs) {
            if(c == '0') red++;
            else yellow++;
        }
        int ans = Math.min(red, yellow)*2;

		System.out.println(ans);
	}
}
