import java.io.*;

class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        int[] rb = {0,0};
        for (String s:str.split("")){
            if (s.equals("0")){
                rb[0]++;
            } else {
                rb[1]++;
            }
        }
        System.out.println(Math.min(rb[0],rb[1])*2);
    }
} import java.io.*; io.* java class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        int[] rb = {0,0};
        for (String s:str.split("")){
            if (s.equals("0")){
                rb[0]++;
            } else {
                rb[1]++;
            }
        }
        System.out.println(Math.min(rb[0],rb[1])*2);
    }
} Main public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        int[] rb = {0,0};
        for (String s:str.split("")){
            if (s.equals("0")){
                rb[0]++;
            } else {
                rb[1]++;
            }
        }
        System.out.println(Math.min(rb[0],rb[1])*2);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        int[] rb = {0,0};
        for (String s:str.split("")){
            if (s.equals("0")){
                rb[0]++;
            } else {
                rb[1]++;
            }
        }
        System.out.println(Math.min(rb[0],rb[1])*2);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str = br.readLine(); str br.readLine() br.readLine br int[] rb = {0,0}; rb {0,0} 0 0 for (String s:str.split("")){
            if (s.equals("0")){
                rb[0]++;
            } else {
                rb[1]++;
            }
        } String s str.split("") str.split str "" {
            if (s.equals("0")){
                rb[0]++;
            } else {
                rb[1]++;
            }
        } {
            if (s.equals("0")){
                rb[0]++;
            } else {
                rb[1]++;
            }
        } if (s.equals("0")){
                rb[0]++;
            } else {
                rb[1]++;
            } s.equals("0") s.equals s "0" {
                rb[0]++;
            } rb[0]++ rb[0] rb 0 {
                rb[1]++;
            } rb[1]++ rb[1] rb 1 System.out.println(Math.min(rb[0],rb[1])*2) System.out.println System.out System System.out Math.min(rb[0],rb[1])*2 Math.min(rb[0],rb[1]) Math.min Math rb[0] rb 0 rb[1] rb 1 2 String[] args args
import java.io.*;

class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        int[] rb = {0,0};
        for (String s:str.split("")){
            if (s.equals("0")){
                rb[0]++;
            } else {
                rb[1]++;
            }
        }
        System.out.println(Math.min(rb[0],rb[1])*2);
    }
}