import java.util.*;

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

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