import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        char[] chars = s.next().toCharArray();
        ArrayList<Integer> list = new ArrayList<>();
        for (char c : chars) {
            list.add(Character.getNumericValue(c));
        }

        int zero = 0;
        int one = 0;
        for (int num : list) {
            if (num == 0) zero++;
            else one++;
        }
        System.out.println(Math.min(zero, one) * 2);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        char[] chars = s.next().toCharArray();
        ArrayList<Integer> list = new ArrayList<>();
        for (char c : chars) {
            list.add(Character.getNumericValue(c));
        }

        int zero = 0;
        int one = 0;
        for (int num : list) {
            if (num == 0) zero++;
            else one++;
        }
        System.out.println(Math.min(zero, one) * 2);
    }
} Main public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        char[] chars = s.next().toCharArray();
        ArrayList<Integer> list = new ArrayList<>();
        for (char c : chars) {
            list.add(Character.getNumericValue(c));
        }

        int zero = 0;
        int one = 0;
        for (int num : list) {
            if (num == 0) zero++;
            else one++;
        }
        System.out.println(Math.min(zero, one) * 2);
    } main {
        Scanner s = new Scanner(System.in);
        char[] chars = s.next().toCharArray();
        ArrayList<Integer> list = new ArrayList<>();
        for (char c : chars) {
            list.add(Character.getNumericValue(c));
        }

        int zero = 0;
        int one = 0;
        for (int num : list) {
            if (num == 0) zero++;
            else one++;
        }
        System.out.println(Math.min(zero, one) * 2);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) char[] chars = s.next().toCharArray(); chars s.next().toCharArray() s.next().toCharArray s.next() s.next s ArrayList<Integer> list = new ArrayList<>(); list new ArrayList<>() for (char c : chars) {
            list.add(Character.getNumericValue(c));
        } char c chars {
            list.add(Character.getNumericValue(c));
        } {
            list.add(Character.getNumericValue(c));
        } list.add(Character.getNumericValue(c)) list.add list Character.getNumericValue(c) Character.getNumericValue Character c int zero = 0; zero 0 int one = 0; one 0 for (int num : list) {
            if (num == 0) zero++;
            else one++;
        } int num list {
            if (num == 0) zero++;
            else one++;
        } {
            if (num == 0) zero++;
            else one++;
        } if (num == 0) zero++;
            else one++; num == 0 num 0 zero++ zero one++ one System.out.println(Math.min(zero, one) * 2) System.out.println System.out System System.out Math.min(zero, one) * 2 Math.min(zero, one) Math.min Math zero one 2 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        char[] chars = s.next().toCharArray();
        ArrayList<Integer> list = new ArrayList<>();
        for (char c : chars) {
            list.add(Character.getNumericValue(c));
        }

        int zero = 0;
        int one = 0;
        for (int num : list) {
            if (num == 0) zero++;
            else one++;
        }
        System.out.println(Math.min(zero, one) * 2);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        char[] chars = s.next().toCharArray();
        ArrayList<Integer> list = new ArrayList<>();
        for (char c : chars) {
            list.add(Character.getNumericValue(c));
        }

        int zero = 0;
        int one = 0;
        for (int num : list) {
            if (num == 0) zero++;
            else one++;
        }
        System.out.println(Math.min(zero, one) * 2);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        char[] chars = s.next().toCharArray();
        ArrayList<Integer> list = new ArrayList<>();
        for (char c : chars) {
            list.add(Character.getNumericValue(c));
        }

        int zero = 0;
        int one = 0;
        for (int num : list) {
            if (num == 0) zero++;
            else one++;
        }
        System.out.println(Math.min(zero, one) * 2);
    }
}