import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        // 主処理
        int red = s.length() - s.replace("0", "").length();
        int blue = s.length() - s.replace("1", "").length();
        int result = Math.min(red, blue) * 2;

        // 出力
        System.out.println(result);
        sc.close();
    }
} import java.util.*; util.* java public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        // 主処理
        int red = s.length() - s.replace("0", "").length();
        int blue = s.length() - s.replace("1", "").length();
        int result = Math.min(red, blue) * 2;

        // 出力
        System.out.println(result);
        sc.close();
    }
} Main public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        // 主処理
        int red = s.length() - s.replace("0", "").length();
        int blue = s.length() - s.replace("1", "").length();
        int result = Math.min(red, blue) * 2;

        // 出力
        System.out.println(result);
        sc.close();
    } main {

        // 入力
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        // 主処理
        int red = s.length() - s.replace("0", "").length();
        int blue = s.length() - s.replace("1", "").length();
        int result = Math.min(red, blue) * 2;

        // 出力
        System.out.println(result);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int red = s.length() - s.replace("0", "").length(); red s.length() - s.replace("0", "").length() s.length() s.length s s.replace("0", "").length() s.replace("0", "").length s.replace("0", "") s.replace s "0" "" int blue = s.length() - s.replace("1", "").length(); blue s.length() - s.replace("1", "").length() s.length() s.length s s.replace("1", "").length() s.replace("1", "").length s.replace("1", "") s.replace s "1" "" int result = Math.min(red, blue) * 2; result Math.min(red, blue) * 2 Math.min(red, blue) Math.min Math red blue 2 System.out.println(result) System.out.println System.out System System.out result sc.close() sc.close sc String args[] args public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        // 主処理
        int red = s.length() - s.replace("0", "").length();
        int blue = s.length() - s.replace("1", "").length();
        int result = Math.min(red, blue) * 2;

        // 出力
        System.out.println(result);
        sc.close();
    }
} public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        // 主処理
        int red = s.length() - s.replace("0", "").length();
        int blue = s.length() - s.replace("1", "").length();
        int result = Math.min(red, blue) * 2;

        // 出力
        System.out.println(result);
        sc.close();
    }
} Main
import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        // 主処理
        int red = s.length() - s.replace("0", "").length();
        int blue = s.length() - s.replace("1", "").length();
        int result = Math.min(red, blue) * 2;

        // 出力
        System.out.println(result);
        sc.close();
    }
}
