import java.util.*;

public class Main {

    public static void main(String args[]) {

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

        // 主処理
        int count0 = s.replaceAll("[^0]", "").length();
        int count1 = s.replaceAll("[^1]", "").length();
        int result = Math.min(count0, count1) * 2;

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

    public static void main(String args[]) {

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

        // 主処理
        int count0 = s.replaceAll("[^0]", "").length();
        int count1 = s.replaceAll("[^1]", "").length();
        int result = Math.min(count0, count1) * 2;

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

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

        // 主処理
        int count0 = s.replaceAll("[^0]", "").length();
        int count1 = s.replaceAll("[^1]", "").length();
        int result = Math.min(count0, count1) * 2;

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

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

        // 主処理
        int count0 = s.replaceAll("[^0]", "").length();
        int count1 = s.replaceAll("[^1]", "").length();
        int result = Math.min(count0, count1) * 2;

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

    public static void main(String args[]) {

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

        // 主処理
        int count0 = s.replaceAll("[^0]", "").length();
        int count1 = s.replaceAll("[^1]", "").length();
        int result = Math.min(count0, count1) * 2;

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

    public static void main(String args[]) {

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

        // 主処理
        int count0 = s.replaceAll("[^0]", "").length();
        int count1 = s.replaceAll("[^1]", "").length();
        int result = Math.min(count0, count1) * 2;

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

public class Main {

    public static void main(String args[]) {

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

        // 主処理
        int count0 = s.replaceAll("[^0]", "").length();
        int count1 = s.replaceAll("[^1]", "").length();
        int result = Math.min(count0, count1) * 2;

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