import java.util.*;

public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);

        String[] s = sc.next().split("");
        int zero = 0;
        int one = 0;

        for (String value : s) {
            if (value.equals("0")) {
                zero++;
            } else {
                one++;
            }
        }

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

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);

        String[] s = sc.next().split("");
        int zero = 0;
        int one = 0;

        for (String value : s) {
            if (value.equals("0")) {
                zero++;
            } else {
                one++;
            }
        }

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

        String[] s = sc.next().split("");
        int zero = 0;
        int one = 0;

        for (String value : s) {
            if (value.equals("0")) {
                zero++;
            } else {
                one++;
            }
        }

        System.out.println(2 * Math.min(zero, one));
    } main {
        // write your code here
        Scanner sc = new Scanner(System.in);

        String[] s = sc.next().split("");
        int zero = 0;
        int one = 0;

        for (String value : s) {
            if (value.equals("0")) {
                zero++;
            } else {
                one++;
            }
        }

        System.out.println(2 * Math.min(zero, one));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] s = sc.next().split(""); s sc.next().split("") sc.next().split sc.next() sc.next sc "" int zero = 0; zero 0 int one = 0; one 0 for (String value : s) {
            if (value.equals("0")) {
                zero++;
            } else {
                one++;
            }
        } String value s {
            if (value.equals("0")) {
                zero++;
            } else {
                one++;
            }
        } {
            if (value.equals("0")) {
                zero++;
            } else {
                one++;
            }
        } if (value.equals("0")) {
                zero++;
            } else {
                one++;
            } value.equals("0") value.equals value "0" {
                zero++;
            } zero++ zero {
                one++;
            } one++ one System.out.println(2 * Math.min(zero, one)) System.out.println System.out System System.out 2 * Math.min(zero, one) 2 Math.min(zero, one) Math.min Math zero one String[] args args public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);

        String[] s = sc.next().split("");
        int zero = 0;
        int one = 0;

        for (String value : s) {
            if (value.equals("0")) {
                zero++;
            } else {
                one++;
            }
        }

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

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);

        String[] s = sc.next().split("");
        int zero = 0;
        int one = 0;

        for (String value : s) {
            if (value.equals("0")) {
                zero++;
            } else {
                one++;
            }
        }

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

public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);

        String[] s = sc.next().split("");
        int zero = 0;
        int one = 0;

        for (String value : s) {
            if (value.equals("0")) {
                zero++;
            } else {
                one++;
            }
        }

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