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