import java.util.Scanner;

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

        int zeroCount = 0;
        int oneCount = 0;
        for(char ch : S.toCharArray()) {
            if (ch == '0') zeroCount++;
            if (ch == '1') oneCount++;
        }
        System.out.println(Math.min(zeroCount, oneCount) * 2);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();

        int zeroCount = 0;
        int oneCount = 0;
        for(char ch : S.toCharArray()) {
            if (ch == '0') zeroCount++;
            if (ch == '1') oneCount++;
        }
        System.out.println(Math.min(zeroCount, oneCount) * 2);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();

        int zeroCount = 0;
        int oneCount = 0;
        for(char ch : S.toCharArray()) {
            if (ch == '0') zeroCount++;
            if (ch == '1') oneCount++;
        }
        System.out.println(Math.min(zeroCount, oneCount) * 2);
    } main {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();

        int zeroCount = 0;
        int oneCount = 0;
        for(char ch : S.toCharArray()) {
            if (ch == '0') zeroCount++;
            if (ch == '1') oneCount++;
        }
        System.out.println(Math.min(zeroCount, oneCount) * 2);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int zeroCount = 0; zeroCount 0 int oneCount = 0; oneCount 0 for(char ch : S.toCharArray()) {
            if (ch == '0') zeroCount++;
            if (ch == '1') oneCount++;
        } char ch S.toCharArray() S.toCharArray S {
            if (ch == '0') zeroCount++;
            if (ch == '1') oneCount++;
        } {
            if (ch == '0') zeroCount++;
            if (ch == '1') oneCount++;
        } if (ch == '0') zeroCount++; ch == '0' ch '0' zeroCount++ zeroCount if (ch == '1') oneCount++; ch == '1' ch '1' oneCount++ oneCount System.out.println(Math.min(zeroCount, oneCount) * 2) System.out.println System.out System System.out Math.min(zeroCount, oneCount) * 2 Math.min(zeroCount, oneCount) Math.min Math zeroCount oneCount 2 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();

        int zeroCount = 0;
        int oneCount = 0;
        for(char ch : S.toCharArray()) {
            if (ch == '0') zeroCount++;
            if (ch == '1') oneCount++;
        }
        System.out.println(Math.min(zeroCount, oneCount) * 2);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();

        int zeroCount = 0;
        int oneCount = 0;
        for(char ch : S.toCharArray()) {
            if (ch == '0') zeroCount++;
            if (ch == '1') oneCount++;
        }
        System.out.println(Math.min(zeroCount, oneCount) * 2);
    }
} Main
import java.util.Scanner;

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

        int zeroCount = 0;
        int oneCount = 0;
        for(char ch : S.toCharArray()) {
            if (ch == '0') zeroCount++;
            if (ch == '1') oneCount++;
        }
        System.out.println(Math.min(zeroCount, oneCount) * 2);
    }
}