import java.util.Scanner;

public class Main{

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        
        // input
        String input = scan.next();
        char[] inputChar = input.toCharArray();

        // search
        int countZero = 0;
        int countOne = 0;
        for(int i = 0; i < inputChar.length; i++){
            if(inputChar[i] == '0'){
                countZero++;
            } else {
                countOne++;
            }
        }
        
        // answer
        System.out.println(Math.min(countZero, countOne) * 2);

    }
} import java.util.Scanner; Scanner java.util public class Main{

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        
        // input
        String input = scan.next();
        char[] inputChar = input.toCharArray();

        // search
        int countZero = 0;
        int countOne = 0;
        for(int i = 0; i < inputChar.length; i++){
            if(inputChar[i] == '0'){
                countZero++;
            } else {
                countOne++;
            }
        }
        
        // answer
        System.out.println(Math.min(countZero, countOne) * 2);

    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        
        // input
        String input = scan.next();
        char[] inputChar = input.toCharArray();

        // search
        int countZero = 0;
        int countOne = 0;
        for(int i = 0; i < inputChar.length; i++){
            if(inputChar[i] == '0'){
                countZero++;
            } else {
                countOne++;
            }
        }
        
        // answer
        System.out.println(Math.min(countZero, countOne) * 2);

    } main {
        Scanner scan = new Scanner(System.in);
        
        // input
        String input = scan.next();
        char[] inputChar = input.toCharArray();

        // search
        int countZero = 0;
        int countOne = 0;
        for(int i = 0; i < inputChar.length; i++){
            if(inputChar[i] == '0'){
                countZero++;
            } else {
                countOne++;
            }
        }
        
        // answer
        System.out.println(Math.min(countZero, countOne) * 2);

    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String input = scan.next(); input scan.next() scan.next scan char[] inputChar = input.toCharArray(); inputChar input.toCharArray() input.toCharArray input int countZero = 0; countZero 0 int countOne = 0; countOne 0 for(int i = 0; i < inputChar.length; i++){
            if(inputChar[i] == '0'){
                countZero++;
            } else {
                countOne++;
            }
        } int i = 0; int i = 0; i 0 i < inputChar.length i inputChar.length inputChar inputChar.length i++ i++ i {
            if(inputChar[i] == '0'){
                countZero++;
            } else {
                countOne++;
            }
        } {
            if(inputChar[i] == '0'){
                countZero++;
            } else {
                countOne++;
            }
        } if(inputChar[i] == '0'){
                countZero++;
            } else {
                countOne++;
            } inputChar[i] == '0' inputChar[i] inputChar i '0' {
                countZero++;
            } countZero++ countZero {
                countOne++;
            } countOne++ countOne System.out.println(Math.min(countZero, countOne) * 2) System.out.println System.out System System.out Math.min(countZero, countOne) * 2 Math.min(countZero, countOne) Math.min Math countZero countOne 2 String[] args args public class Main{

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        
        // input
        String input = scan.next();
        char[] inputChar = input.toCharArray();

        // search
        int countZero = 0;
        int countOne = 0;
        for(int i = 0; i < inputChar.length; i++){
            if(inputChar[i] == '0'){
                countZero++;
            } else {
                countOne++;
            }
        }
        
        // answer
        System.out.println(Math.min(countZero, countOne) * 2);

    }
} public class Main{

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        
        // input
        String input = scan.next();
        char[] inputChar = input.toCharArray();

        // search
        int countZero = 0;
        int countOne = 0;
        for(int i = 0; i < inputChar.length; i++){
            if(inputChar[i] == '0'){
                countZero++;
            } else {
                countOne++;
            }
        }
        
        // answer
        System.out.println(Math.min(countZero, countOne) * 2);

    }
} Main
import java.util.Scanner;

public class Main{

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        
        // input
        String input = scan.next();
        char[] inputChar = input.toCharArray();

        // search
        int countZero = 0;
        int countOne = 0;
        for(int i = 0; i < inputChar.length; i++){
            if(inputChar[i] == '0'){
                countZero++;
            } else {
                countOne++;
            }
        }
        
        // answer
        System.out.println(Math.min(countZero, countOne) * 2);

    }
}