import java.util.*;

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

        int red = 0;

        for (int i = 0; i < s.length(); i++) {
            if ('0' == s.charAt(i))
                red++;
        }

        System.out.println(2 * Math.min(s.length() - red, red));

    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int red = 0;

        for (int i = 0; i < s.length(); i++) {
            if ('0' == s.charAt(i))
                red++;
        }

        System.out.println(2 * Math.min(s.length() - red, red));

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

        int red = 0;

        for (int i = 0; i < s.length(); i++) {
            if ('0' == s.charAt(i))
                red++;
        }

        System.out.println(2 * Math.min(s.length() - red, red));

    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int red = 0;

        for (int i = 0; i < s.length(); i++) {
            if ('0' == s.charAt(i))
                red++;
        }

        System.out.println(2 * Math.min(s.length() - red, red));

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int red = 0; red 0 for (int i = 0; i < s.length(); i++) {
            if ('0' == s.charAt(i))
                red++;
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if ('0' == s.charAt(i))
                red++;
        } {
            if ('0' == s.charAt(i))
                red++;
        } if ('0' == s.charAt(i))
                red++; '0' == s.charAt(i) '0' s.charAt(i) s.charAt s i red++ red System.out.println(2 * Math.min(s.length() - red, red)) System.out.println System.out System System.out 2 * Math.min(s.length() - red, red) 2 Math.min(s.length() - red, red) Math.min Math s.length() - red s.length() s.length s red red String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int red = 0;

        for (int i = 0; i < s.length(); i++) {
            if ('0' == s.charAt(i))
                red++;
        }

        System.out.println(2 * Math.min(s.length() - red, red));

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

        int red = 0;

        for (int i = 0; i < s.length(); i++) {
            if ('0' == s.charAt(i))
                red++;
        }

        System.out.println(2 * Math.min(s.length() - red, red));

    }
} Main
import java.util.*;

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

        int red = 0;

        for (int i = 0; i < s.length(); i++) {
            if ('0' == s.charAt(i))
                red++;
        }

        System.out.println(2 * Math.min(s.length() - red, red));

    }
}
