import java.util.*;
import java.io.InputStreamReader;
import java.io.BufferedReader;


public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        
        int count0 = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '0') count0++;
        }
        
        System.out.println(Math.min(count0, s.length()-count0)*2);
    }
}


 import java.util.*; util.* java import java.io.InputStreamReader; InputStreamReader java.io import java.io.BufferedReader; BufferedReader java.io public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        
        int count0 = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '0') count0++;
        }
        
        System.out.println(Math.min(count0, s.length()-count0)*2);
    }
} Main public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        
        int count0 = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '0') count0++;
        }
        
        System.out.println(Math.min(count0, s.length()-count0)*2);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        
        int count0 = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '0') count0++;
        }
        
        System.out.println(Math.min(count0, s.length()-count0)*2);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String s = br.readLine(); s br.readLine() br.readLine br int count0 = 0; count0 0 for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '0') count0++;
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if (s.charAt(i) == '0') count0++;
        } {
            if (s.charAt(i) == '0') count0++;
        } if (s.charAt(i) == '0') count0++; s.charAt(i) == '0' s.charAt(i) s.charAt s i '0' count0++ count0 System.out.println(Math.min(count0, s.length()-count0)*2) System.out.println System.out System System.out Math.min(count0, s.length()-count0)*2 Math.min(count0, s.length()-count0) Math.min Math count0 s.length()-count0 s.length() s.length s count0 2 String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        
        int count0 = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '0') count0++;
        }
        
        System.out.println(Math.min(count0, s.length()-count0)*2);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        
        int count0 = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '0') count0++;
        }
        
        System.out.println(Math.min(count0, s.length()-count0)*2);
    }
} Main
import java.util.*;
import java.io.InputStreamReader;
import java.io.BufferedReader;


public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        
        int count0 = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '0') count0++;
        }
        
        System.out.println(Math.min(count0, s.length()-count0)*2);
    }
}



