import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int N = S.length();
        int one = 0;
        int zero = 0;
        
        for(int i = 0; i < N; i++){
            if(S.charAt(i) == '1'){
                one++;
            }
        }
        for(int i = 0; i < N; i++){
            if(S.charAt(i) == '0'){
                zero++;
            }
        }
        System.out.println(one < zero ? one * 2 : zero * 2);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int N = S.length();
        int one = 0;
        int zero = 0;
        
        for(int i = 0; i < N; i++){
            if(S.charAt(i) == '1'){
                one++;
            }
        }
        for(int i = 0; i < N; i++){
            if(S.charAt(i) == '0'){
                zero++;
            }
        }
        System.out.println(one < zero ? one * 2 : zero * 2);
    }
} Main public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int N = S.length();
        int one = 0;
        int zero = 0;
        
        for(int i = 0; i < N; i++){
            if(S.charAt(i) == '1'){
                one++;
            }
        }
        for(int i = 0; i < N; i++){
            if(S.charAt(i) == '0'){
                zero++;
            }
        }
        System.out.println(one < zero ? one * 2 : zero * 2);
    } main {

        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int N = S.length();
        int one = 0;
        int zero = 0;
        
        for(int i = 0; i < N; i++){
            if(S.charAt(i) == '1'){
                one++;
            }
        }
        for(int i = 0; i < N; i++){
            if(S.charAt(i) == '0'){
                zero++;
            }
        }
        System.out.println(one < zero ? one * 2 : zero * 2);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int N = S.length(); N S.length() S.length S int one = 0; one 0 int zero = 0; zero 0 for(int i = 0; i < N; i++){
            if(S.charAt(i) == '1'){
                one++;
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            if(S.charAt(i) == '1'){
                one++;
            }
        } {
            if(S.charAt(i) == '1'){
                one++;
            }
        } if(S.charAt(i) == '1'){
                one++;
            } S.charAt(i) == '1' S.charAt(i) S.charAt S i '1' {
                one++;
            } one++ one for(int i = 0; i < N; i++){
            if(S.charAt(i) == '0'){
                zero++;
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            if(S.charAt(i) == '0'){
                zero++;
            }
        } {
            if(S.charAt(i) == '0'){
                zero++;
            }
        } if(S.charAt(i) == '0'){
                zero++;
            } S.charAt(i) == '0' S.charAt(i) S.charAt S i '0' {
                zero++;
            } zero++ zero System.out.println(one < zero ? one * 2 : zero * 2) System.out.println System.out System System.out one < zero ? one * 2 : zero * 2 one < zero one zero one * 2 one 2 zero * 2 zero 2 String[] args args public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int N = S.length();
        int one = 0;
        int zero = 0;
        
        for(int i = 0; i < N; i++){
            if(S.charAt(i) == '1'){
                one++;
            }
        }
        for(int i = 0; i < N; i++){
            if(S.charAt(i) == '0'){
                zero++;
            }
        }
        System.out.println(one < zero ? one * 2 : zero * 2);
    }
} public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int N = S.length();
        int one = 0;
        int zero = 0;
        
        for(int i = 0; i < N; i++){
            if(S.charAt(i) == '1'){
                one++;
            }
        }
        for(int i = 0; i < N; i++){
            if(S.charAt(i) == '0'){
                zero++;
            }
        }
        System.out.println(one < zero ? one * 2 : zero * 2);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int N = S.length();
        int one = 0;
        int zero = 0;
        
        for(int i = 0; i < N; i++){
            if(S.charAt(i) == '1'){
                one++;
            }
        }
        for(int i = 0; i < N; i++){
            if(S.charAt(i) == '0'){
                zero++;
            }
        }
        System.out.println(one < zero ? one * 2 : zero * 2);
    }
}
