import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        String s = std.next();
        String[] cubes = s.split("");
        int redCube = 0;
        int blueCube = 0;
        for (int i = 0; i < cubes.length; i++) {
            if (cubes[i].equals("0")) {
                redCube++;
            } else {
                blueCube++;
            }
        }

        System.out.println(Math.min(redCube, blueCube) * 2);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        String s = std.next();
        String[] cubes = s.split("");
        int redCube = 0;
        int blueCube = 0;
        for (int i = 0; i < cubes.length; i++) {
            if (cubes[i].equals("0")) {
                redCube++;
            } else {
                blueCube++;
            }
        }

        System.out.println(Math.min(redCube, blueCube) * 2);
    }
} Main public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        String s = std.next();
        String[] cubes = s.split("");
        int redCube = 0;
        int blueCube = 0;
        for (int i = 0; i < cubes.length; i++) {
            if (cubes[i].equals("0")) {
                redCube++;
            } else {
                blueCube++;
            }
        }

        System.out.println(Math.min(redCube, blueCube) * 2);
    } main {
        Scanner std = new Scanner(System.in);
        String s = std.next();
        String[] cubes = s.split("");
        int redCube = 0;
        int blueCube = 0;
        for (int i = 0; i < cubes.length; i++) {
            if (cubes[i].equals("0")) {
                redCube++;
            } else {
                blueCube++;
            }
        }

        System.out.println(Math.min(redCube, blueCube) * 2);
    } Scanner std = new Scanner(System.in); std new Scanner(System.in) String s = std.next(); s std.next() std.next std String[] cubes = s.split(""); cubes s.split("") s.split s "" int redCube = 0; redCube 0 int blueCube = 0; blueCube 0 for (int i = 0; i < cubes.length; i++) {
            if (cubes[i].equals("0")) {
                redCube++;
            } else {
                blueCube++;
            }
        } int i = 0; int i = 0; i 0 i < cubes.length i cubes.length cubes cubes.length i++ i++ i {
            if (cubes[i].equals("0")) {
                redCube++;
            } else {
                blueCube++;
            }
        } {
            if (cubes[i].equals("0")) {
                redCube++;
            } else {
                blueCube++;
            }
        } if (cubes[i].equals("0")) {
                redCube++;
            } else {
                blueCube++;
            } cubes[i].equals("0") cubes[i].equals cubes[i] cubes i "0" {
                redCube++;
            } redCube++ redCube {
                blueCube++;
            } blueCube++ blueCube System.out.println(Math.min(redCube, blueCube) * 2) System.out.println System.out System System.out Math.min(redCube, blueCube) * 2 Math.min(redCube, blueCube) Math.min Math redCube blueCube 2 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        String s = std.next();
        String[] cubes = s.split("");
        int redCube = 0;
        int blueCube = 0;
        for (int i = 0; i < cubes.length; i++) {
            if (cubes[i].equals("0")) {
                redCube++;
            } else {
                blueCube++;
            }
        }

        System.out.println(Math.min(redCube, blueCube) * 2);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        String s = std.next();
        String[] cubes = s.split("");
        int redCube = 0;
        int blueCube = 0;
        for (int i = 0; i < cubes.length; i++) {
            if (cubes[i].equals("0")) {
                redCube++;
            } else {
                blueCube++;
            }
        }

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

public class Main {
    public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        String s = std.next();
        String[] cubes = s.split("");
        int redCube = 0;
        int blueCube = 0;
        for (int i = 0; i < cubes.length; i++) {
            if (cubes[i].equals("0")) {
                redCube++;
            } else {
                blueCube++;
            }
        }

        System.out.println(Math.min(redCube, blueCube) * 2);
    }
}
