import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();

        int countRed = 0;
        int countBlue = 0;
        for(int i = 0; i < S.length; i++){
            if('0' == S[i]){
                countRed++;
            }
        }
        for(int i = 0; i < S.length; i++){
            if('1' == S[i]){
                countBlue++;
            }
        }

        System.out.println(Math.min(countRed,countBlue)*2);

    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();

        int countRed = 0;
        int countBlue = 0;
        for(int i = 0; i < S.length; i++){
            if('0' == S[i]){
                countRed++;
            }
        }
        for(int i = 0; i < S.length; i++){
            if('1' == S[i]){
                countBlue++;
            }
        }

        System.out.println(Math.min(countRed,countBlue)*2);

    }
} Main public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();

        int countRed = 0;
        int countBlue = 0;
        for(int i = 0; i < S.length; i++){
            if('0' == S[i]){
                countRed++;
            }
        }
        for(int i = 0; i < S.length; i++){
            if('1' == S[i]){
                countBlue++;
            }
        }

        System.out.println(Math.min(countRed,countBlue)*2);

    } main {
    	Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();

        int countRed = 0;
        int countBlue = 0;
        for(int i = 0; i < S.length; i++){
            if('0' == S[i]){
                countRed++;
            }
        }
        for(int i = 0; i < S.length; i++){
            if('1' == S[i]){
                countBlue++;
            }
        }

        System.out.println(Math.min(countRed,countBlue)*2);

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

        int countRed = 0;
        int countBlue = 0;
        for(int i = 0; i < S.length; i++){
            if('0' == S[i]){
                countRed++;
            }
        }
        for(int i = 0; i < S.length; i++){
            if('1' == S[i]){
                countBlue++;
            }
        }

        System.out.println(Math.min(countRed,countBlue)*2);

    }
} public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();

        int countRed = 0;
        int countBlue = 0;
        for(int i = 0; i < S.length; i++){
            if('0' == S[i]){
                countRed++;
            }
        }
        for(int i = 0; i < S.length; i++){
            if('1' == S[i]){
                countBlue++;
            }
        }

        System.out.println(Math.min(countRed,countBlue)*2);

    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();

        int countRed = 0;
        int countBlue = 0;
        for(int i = 0; i < S.length; i++){
            if('0' == S[i]){
                countRed++;
            }
        }
        for(int i = 0; i < S.length; i++){
            if('1' == S[i]){
                countBlue++;
            }
        }

        System.out.println(Math.min(countRed,countBlue)*2);

    }
}