import java.util.*;

public class Main {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        char[] chars = s.toCharArray();
        int numOfZero = 0;
        int numOfOne = 0;
        for (int i = 0; i < chars.length; i++) {
            if (chars[i] == '0') {
                numOfZero++;
            }
            if (chars[i] == '1') {
                numOfOne++;
            }
        }
        System.out.println(2 * Math.min(numOfOne, numOfZero));
    }

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

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        char[] chars = s.toCharArray();
        int numOfZero = 0;
        int numOfOne = 0;
        for (int i = 0; i < chars.length; i++) {
            if (chars[i] == '0') {
                numOfZero++;
            }
            if (chars[i] == '1') {
                numOfOne++;
            }
        }
        System.out.println(2 * Math.min(numOfOne, numOfZero));
    }

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

        String s = sc.next();
        char[] chars = s.toCharArray();
        int numOfZero = 0;
        int numOfOne = 0;
        for (int i = 0; i < chars.length; i++) {
            if (chars[i] == '0') {
                numOfZero++;
            }
            if (chars[i] == '1') {
                numOfOne++;
            }
        }
        System.out.println(2 * Math.min(numOfOne, numOfZero));
    } main {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        char[] chars = s.toCharArray();
        int numOfZero = 0;
        int numOfOne = 0;
        for (int i = 0; i < chars.length; i++) {
            if (chars[i] == '0') {
                numOfZero++;
            }
            if (chars[i] == '1') {
                numOfOne++;
            }
        }
        System.out.println(2 * Math.min(numOfOne, numOfZero));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc char[] chars = s.toCharArray(); chars s.toCharArray() s.toCharArray s int numOfZero = 0; numOfZero 0 int numOfOne = 0; numOfOne 0 for (int i = 0; i < chars.length; i++) {
            if (chars[i] == '0') {
                numOfZero++;
            }
            if (chars[i] == '1') {
                numOfOne++;
            }
        } int i = 0; int i = 0; i 0 i < chars.length i chars.length chars chars.length i++ i++ i {
            if (chars[i] == '0') {
                numOfZero++;
            }
            if (chars[i] == '1') {
                numOfOne++;
            }
        } {
            if (chars[i] == '0') {
                numOfZero++;
            }
            if (chars[i] == '1') {
                numOfOne++;
            }
        } if (chars[i] == '0') {
                numOfZero++;
            } chars[i] == '0' chars[i] chars i '0' {
                numOfZero++;
            } numOfZero++ numOfZero if (chars[i] == '1') {
                numOfOne++;
            } chars[i] == '1' chars[i] chars i '1' {
                numOfOne++;
            } numOfOne++ numOfOne System.out.println(2 * Math.min(numOfOne, numOfZero)) System.out.println System.out System System.out 2 * Math.min(numOfOne, numOfZero) 2 Math.min(numOfOne, numOfZero) Math.min Math numOfOne numOfZero String[] args args public class Main {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        char[] chars = s.toCharArray();
        int numOfZero = 0;
        int numOfOne = 0;
        for (int i = 0; i < chars.length; i++) {
            if (chars[i] == '0') {
                numOfZero++;
            }
            if (chars[i] == '1') {
                numOfOne++;
            }
        }
        System.out.println(2 * Math.min(numOfOne, numOfZero));
    }

} public class Main {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        char[] chars = s.toCharArray();
        int numOfZero = 0;
        int numOfOne = 0;
        for (int i = 0; i < chars.length; i++) {
            if (chars[i] == '0') {
                numOfZero++;
            }
            if (chars[i] == '1') {
                numOfOne++;
            }
        }
        System.out.println(2 * Math.min(numOfOne, numOfZero));
    }

} Main
import java.util.*;

public class Main {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        char[] chars = s.toCharArray();
        int numOfZero = 0;
        int numOfOne = 0;
        for (int i = 0; i < chars.length; i++) {
            if (chars[i] == '0') {
                numOfZero++;
            }
            if (chars[i] == '1') {
                numOfOne++;
            }
        }
        System.out.println(2 * Math.min(numOfOne, numOfZero));
    }

}