import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        String S = scanner.next();

        long zero = 0;
        long one = 0;

        for(char c: S.toCharArray()){
            if(c == '0'){
                zero++;
            }else{
                one++;
            }
        }

        System.out.println(Math.min(zero, one) * 2);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        String S = scanner.next();

        long zero = 0;
        long one = 0;

        for(char c: S.toCharArray()){
            if(c == '0'){
                zero++;
            }else{
                one++;
            }
        }

        System.out.println(Math.min(zero, one) * 2);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        String S = scanner.next();

        long zero = 0;
        long one = 0;

        for(char c: S.toCharArray()){
            if(c == '0'){
                zero++;
            }else{
                one++;
            }
        }

        System.out.println(Math.min(zero, one) * 2);
    } main {
        Scanner scanner = new Scanner(System.in);

        String S = scanner.next();

        long zero = 0;
        long one = 0;

        for(char c: S.toCharArray()){
            if(c == '0'){
                zero++;
            }else{
                one++;
            }
        }

        System.out.println(Math.min(zero, one) * 2);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String S = scanner.next(); S scanner.next() scanner.next scanner long zero = 0; zero 0 long one = 0; one 0 for(char c: S.toCharArray()){
            if(c == '0'){
                zero++;
            }else{
                one++;
            }
        } char c S.toCharArray() S.toCharArray S {
            if(c == '0'){
                zero++;
            }else{
                one++;
            }
        } {
            if(c == '0'){
                zero++;
            }else{
                one++;
            }
        } if(c == '0'){
                zero++;
            }else{
                one++;
            } c == '0' c '0' {
                zero++;
            } zero++ zero {
                one++;
            } 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 scanner = new Scanner(System.in);

        String S = scanner.next();

        long zero = 0;
        long one = 0;

        for(char c: S.toCharArray()){
            if(c == '0'){
                zero++;
            }else{
                one++;
            }
        }

        System.out.println(Math.min(zero, one) * 2);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        String S = scanner.next();

        long zero = 0;
        long one = 0;

        for(char c: S.toCharArray()){
            if(c == '0'){
                zero++;
            }else{
                one++;
            }
        }

        System.out.println(Math.min(zero, one) * 2);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        String S = scanner.next();

        long zero = 0;
        long one = 0;

        for(char c: S.toCharArray()){
            if(c == '0'){
                zero++;
            }else{
                one++;
            }
        }

        System.out.println(Math.min(zero, one) * 2);
    }
}
