import java.util.Scanner;

class Main {
    public static void main(String[] args) {
    	
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String A = s.replaceAll("0", "");
        String B = s.replaceAll("1", "");
        
        System.out.println(Math.min(A.length(), B.length())*2);
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
    	
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String A = s.replaceAll("0", "");
        String B = s.replaceAll("1", "");
        
        System.out.println(Math.min(A.length(), B.length())*2);
    }
} Main public static void main(String[] args) {
    	
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String A = s.replaceAll("0", "");
        String B = s.replaceAll("1", "");
        
        System.out.println(Math.min(A.length(), B.length())*2);
    } main {
    	
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String A = s.replaceAll("0", "");
        String B = s.replaceAll("1", "");
        
        System.out.println(Math.min(A.length(), B.length())*2);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String A = s.replaceAll("0", ""); A s.replaceAll("0", "") s.replaceAll s "0" "" String B = s.replaceAll("1", ""); B s.replaceAll("1", "") s.replaceAll s "1" "" System.out.println(Math.min(A.length(), B.length())*2) System.out.println System.out System System.out Math.min(A.length(), B.length())*2 Math.min(A.length(), B.length()) Math.min Math A.length() A.length A B.length() B.length B 2 String[] args args
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
    	
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String A = s.replaceAll("0", "");
        String B = s.replaceAll("1", "");
        
        System.out.println(Math.min(A.length(), B.length())*2);
    }
}