
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final char[] cubes = scanner.nextLine().toCharArray();

        int zeroCounter = 0;
        int oneCounter = 0;
        for (final char cube : cubes) {
            if (cube == '1') {
                oneCounter++;
            } else {
                zeroCounter++;
            }
        }

        System.out.println(2 * Math.min(zeroCounter, oneCounter));
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final char[] cubes = scanner.nextLine().toCharArray();

        int zeroCounter = 0;
        int oneCounter = 0;
        for (final char cube : cubes) {
            if (cube == '1') {
                oneCounter++;
            } else {
                zeroCounter++;
            }
        }

        System.out.println(2 * Math.min(zeroCounter, oneCounter));
    }
} Main public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final char[] cubes = scanner.nextLine().toCharArray();

        int zeroCounter = 0;
        int oneCounter = 0;
        for (final char cube : cubes) {
            if (cube == '1') {
                oneCounter++;
            } else {
                zeroCounter++;
            }
        }

        System.out.println(2 * Math.min(zeroCounter, oneCounter));
    } main {
        final Scanner scanner = new Scanner(System.in);
        final char[] cubes = scanner.nextLine().toCharArray();

        int zeroCounter = 0;
        int oneCounter = 0;
        for (final char cube : cubes) {
            if (cube == '1') {
                oneCounter++;
            } else {
                zeroCounter++;
            }
        }

        System.out.println(2 * Math.min(zeroCounter, oneCounter));
    } final Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) final char[] cubes = scanner.nextLine().toCharArray(); cubes scanner.nextLine().toCharArray() scanner.nextLine().toCharArray scanner.nextLine() scanner.nextLine scanner int zeroCounter = 0; zeroCounter 0 int oneCounter = 0; oneCounter 0 for (final char cube : cubes) {
            if (cube == '1') {
                oneCounter++;
            } else {
                zeroCounter++;
            }
        } final char cube cubes {
            if (cube == '1') {
                oneCounter++;
            } else {
                zeroCounter++;
            }
        } {
            if (cube == '1') {
                oneCounter++;
            } else {
                zeroCounter++;
            }
        } if (cube == '1') {
                oneCounter++;
            } else {
                zeroCounter++;
            } cube == '1' cube '1' {
                oneCounter++;
            } oneCounter++ oneCounter {
                zeroCounter++;
            } zeroCounter++ zeroCounter System.out.println(2 * Math.min(zeroCounter, oneCounter)) System.out.println System.out System System.out 2 * Math.min(zeroCounter, oneCounter) 2 Math.min(zeroCounter, oneCounter) Math.min Math zeroCounter oneCounter String[] args args public class Main {

    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final char[] cubes = scanner.nextLine().toCharArray();

        int zeroCounter = 0;
        int oneCounter = 0;
        for (final char cube : cubes) {
            if (cube == '1') {
                oneCounter++;
            } else {
                zeroCounter++;
            }
        }

        System.out.println(2 * Math.min(zeroCounter, oneCounter));
    }
} public class Main {

    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final char[] cubes = scanner.nextLine().toCharArray();

        int zeroCounter = 0;
        int oneCounter = 0;
        for (final char cube : cubes) {
            if (cube == '1') {
                oneCounter++;
            } else {
                zeroCounter++;
            }
        }

        System.out.println(2 * Math.min(zeroCounter, oneCounter));
    }
} Main

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final char[] cubes = scanner.nextLine().toCharArray();

        int zeroCounter = 0;
        int oneCounter = 0;
        for (final char cube : cubes) {
            if (cube == '1') {
                oneCounter++;
            } else {
                zeroCounter++;
            }
        }

        System.out.println(2 * Math.min(zeroCounter, oneCounter));
    }
}
