import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        char[] c = s.toCharArray();
        int zero = 0;
        int one = 0;
        for (int i = 0; i < s.length(); i++) {
            if(c[i] == '0') {
                zero++;
            }else{ 
                one++;
            }
        }
        int ans = Math.min(zero, one) * 2;
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {

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

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

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        char[] c = s.toCharArray();
        int zero = 0;
        int one = 0;
        for (int i = 0; i < s.length(); i++) {
            if(c[i] == '0') {
                zero++;
            }else{ 
                one++;
            }
        }
        int ans = Math.min(zero, one) * 2;
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        char[] c = s.toCharArray();
        int zero = 0;
        int one = 0;
        for (int i = 0; i < s.length(); i++) {
            if(c[i] == '0') {
                zero++;
            }else{ 
                one++;
            }
        }
        int ans = Math.min(zero, one) * 2;
        System.out.println(ans);
    }
}
