import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        char[] cube = sc.next().toCharArray();
        int zero = 0,
        one = 0;
        for(int i = 0; i < cube.length; i++){
            switch(cube[i]){
                case '0':
                zero++;
                break;
                default :
                one++;
            }
        }
        System.out.println(Math.min(zero, one)*2);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        char[] cube = sc.next().toCharArray();
        int zero = 0,
        one = 0;
        for(int i = 0; i < cube.length; i++){
            switch(cube[i]){
                case '0':
                zero++;
                break;
                default :
                one++;
            }
        }
        System.out.println(Math.min(zero, one)*2);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        char[] cube = sc.next().toCharArray();
        int zero = 0,
        one = 0;
        for(int i = 0; i < cube.length; i++){
            switch(cube[i]){
                case '0':
                zero++;
                break;
                default :
                one++;
            }
        }
        System.out.println(Math.min(zero, one)*2);
    } main {
        Scanner sc = new Scanner(System.in);
        char[] cube = sc.next().toCharArray();
        int zero = 0,
        one = 0;
        for(int i = 0; i < cube.length; i++){
            switch(cube[i]){
                case '0':
                zero++;
                break;
                default :
                one++;
            }
        }
        System.out.println(Math.min(zero, one)*2);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] cube = sc.next().toCharArray(); cube sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc int zero = 0 zero 0 one = 0; one 0 for(int i = 0; i < cube.length; i++){
            switch(cube[i]){
                case '0':
                zero++;
                break;
                default :
                one++;
            }
        } int i = 0; int i = 0; i 0 i < cube.length i cube.length cube cube.length i++ i++ i {
            switch(cube[i]){
                case '0':
                zero++;
                break;
                default :
                one++;
            }
        } {
            switch(cube[i]){
                case '0':
                zero++;
                break;
                default :
                one++;
            }
        } switch(cube[i]){
                case '0':
                zero++;
                break;
                default :
                one++;
            } cube[i] cube i case '0': '0' case '0': zero++ zero break; default : default : one++ one System.out.println(Math.min(zero, one)*2) System.out.println System.out System System.out Math.min(zero, one)*2 Math.min(zero, one) Math.min Math zero one 2 String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        char[] cube = sc.next().toCharArray();
        int zero = 0,
        one = 0;
        for(int i = 0; i < cube.length; i++){
            switch(cube[i]){
                case '0':
                zero++;
                break;
                default :
                one++;
            }
        }
        System.out.println(Math.min(zero, one)*2);
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        char[] cube = sc.next().toCharArray();
        int zero = 0,
        one = 0;
        for(int i = 0; i < cube.length; i++){
            switch(cube[i]){
                case '0':
                zero++;
                break;
                default :
                one++;
            }
        }
        System.out.println(Math.min(zero, one)*2);
    }
} Main
import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        char[] cube = sc.next().toCharArray();
        int zero = 0,
        one = 0;
        for(int i = 0; i < cube.length; i++){
            switch(cube[i]){
                case '0':
                zero++;
                break;
                default :
                one++;
            }
        }
        System.out.println(Math.min(zero, one)*2);
    }
}