import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int red = 0;
        int blue = 0;
        for(int i=0;i<s.length;i++){
            if(s[i]=='0'){
                red++;
            }else{
                blue++;
            }
        }
        System.out.println(2*Math.min(red,blue));
        sc.close();
    }
    
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int red = 0;
        int blue = 0;
        for(int i=0;i<s.length;i++){
            if(s[i]=='0'){
                red++;
            }else{
                blue++;
            }
        }
        System.out.println(2*Math.min(red,blue));
        sc.close();
    }
    
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int red = 0;
        int blue = 0;
        for(int i=0;i<s.length;i++){
            if(s[i]=='0'){
                red++;
            }else{
                blue++;
            }
        }
        System.out.println(2*Math.min(red,blue));
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int red = 0;
        int blue = 0;
        for(int i=0;i<s.length;i++){
            if(s[i]=='0'){
                red++;
            }else{
                blue++;
            }
        }
        System.out.println(2*Math.min(red,blue));
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc int red = 0; red 0 int blue = 0; blue 0 for(int i=0;i<s.length;i++){
            if(s[i]=='0'){
                red++;
            }else{
                blue++;
            }
        } int i=0; int i=0; i 0 i<s.length i s.length s s.length i++ i++ i {
            if(s[i]=='0'){
                red++;
            }else{
                blue++;
            }
        } {
            if(s[i]=='0'){
                red++;
            }else{
                blue++;
            }
        } if(s[i]=='0'){
                red++;
            }else{
                blue++;
            } s[i]=='0' s[i] s i '0' {
                red++;
            } red++ red {
                blue++;
            } blue++ blue System.out.println(2*Math.min(red,blue)) System.out.println System.out System System.out 2*Math.min(red,blue) 2 Math.min(red,blue) Math.min Math red blue sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int red = 0;
        int blue = 0;
        for(int i=0;i<s.length;i++){
            if(s[i]=='0'){
                red++;
            }else{
                blue++;
            }
        }
        System.out.println(2*Math.min(red,blue));
        sc.close();
    }
    
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int red = 0;
        int blue = 0;
        for(int i=0;i<s.length;i++){
            if(s[i]=='0'){
                red++;
            }else{
                blue++;
            }
        }
        System.out.println(2*Math.min(red,blue));
        sc.close();
    }
    
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int red = 0;
        int blue = 0;
        for(int i=0;i<s.length;i++){
            if(s[i]=='0'){
                red++;
            }else{
                blue++;
            }
        }
        System.out.println(2*Math.min(red,blue));
        sc.close();
    }
    
}