import java.util.Scanner;
import java.util.Arrays;

public class Main {
        public static void main(String[] args) {
                Scanner scan = new Scanner(System.in);
                String input = scan.nextLine();
                int len = input.length();
                int sum1 = 0;
                int sum0 = 0;
                int result = 0;

                for (int i=0; i<len; i++) {
                        if ( input.charAt(i) == '1' ) {
                                sum1++;
                        }
                        else {
                                sum0++;
                        }
                }
                if ( sum0 <= sum1 ) {
                        result = sum0 * 2;
                }
                else {
                        result = sum1 * 2;
                }
                System.out.println( result );
                scan.close();
        }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main {
        public static void main(String[] args) {
                Scanner scan = new Scanner(System.in);
                String input = scan.nextLine();
                int len = input.length();
                int sum1 = 0;
                int sum0 = 0;
                int result = 0;

                for (int i=0; i<len; i++) {
                        if ( input.charAt(i) == '1' ) {
                                sum1++;
                        }
                        else {
                                sum0++;
                        }
                }
                if ( sum0 <= sum1 ) {
                        result = sum0 * 2;
                }
                else {
                        result = sum1 * 2;
                }
                System.out.println( result );
                scan.close();
        }
} Main public static void main(String[] args) {
                Scanner scan = new Scanner(System.in);
                String input = scan.nextLine();
                int len = input.length();
                int sum1 = 0;
                int sum0 = 0;
                int result = 0;

                for (int i=0; i<len; i++) {
                        if ( input.charAt(i) == '1' ) {
                                sum1++;
                        }
                        else {
                                sum0++;
                        }
                }
                if ( sum0 <= sum1 ) {
                        result = sum0 * 2;
                }
                else {
                        result = sum1 * 2;
                }
                System.out.println( result );
                scan.close();
        } main {
                Scanner scan = new Scanner(System.in);
                String input = scan.nextLine();
                int len = input.length();
                int sum1 = 0;
                int sum0 = 0;
                int result = 0;

                for (int i=0; i<len; i++) {
                        if ( input.charAt(i) == '1' ) {
                                sum1++;
                        }
                        else {
                                sum0++;
                        }
                }
                if ( sum0 <= sum1 ) {
                        result = sum0 * 2;
                }
                else {
                        result = sum1 * 2;
                }
                System.out.println( result );
                scan.close();
        } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String input = scan.nextLine(); input scan.nextLine() scan.nextLine scan int len = input.length(); len input.length() input.length input int sum1 = 0; sum1 0 int sum0 = 0; sum0 0 int result = 0; result 0 for (int i=0; i<len; i++) {
                        if ( input.charAt(i) == '1' ) {
                                sum1++;
                        }
                        else {
                                sum0++;
                        }
                } int i=0; int i=0; i 0 i<len i len i++ i++ i {
                        if ( input.charAt(i) == '1' ) {
                                sum1++;
                        }
                        else {
                                sum0++;
                        }
                } {
                        if ( input.charAt(i) == '1' ) {
                                sum1++;
                        }
                        else {
                                sum0++;
                        }
                } if ( input.charAt(i) == '1' ) {
                                sum1++;
                        }
                        else {
                                sum0++;
                        } input.charAt(i) == '1' input.charAt(i) input.charAt input i '1' {
                                sum1++;
                        } sum1++ sum1 {
                                sum0++;
                        } sum0++ sum0 if ( sum0 <= sum1 ) {
                        result = sum0 * 2;
                }
                else {
                        result = sum1 * 2;
                } sum0 <= sum1 sum0 sum1 {
                        result = sum0 * 2;
                } result = sum0 * 2 result sum0 * 2 sum0 2 {
                        result = sum1 * 2;
                } result = sum1 * 2 result sum1 * 2 sum1 2 System.out.println( result ) System.out.println System.out System System.out result scan.close() scan.close scan String[] args args public class Main {
        public static void main(String[] args) {
                Scanner scan = new Scanner(System.in);
                String input = scan.nextLine();
                int len = input.length();
                int sum1 = 0;
                int sum0 = 0;
                int result = 0;

                for (int i=0; i<len; i++) {
                        if ( input.charAt(i) == '1' ) {
                                sum1++;
                        }
                        else {
                                sum0++;
                        }
                }
                if ( sum0 <= sum1 ) {
                        result = sum0 * 2;
                }
                else {
                        result = sum1 * 2;
                }
                System.out.println( result );
                scan.close();
        }
} public class Main {
        public static void main(String[] args) {
                Scanner scan = new Scanner(System.in);
                String input = scan.nextLine();
                int len = input.length();
                int sum1 = 0;
                int sum0 = 0;
                int result = 0;

                for (int i=0; i<len; i++) {
                        if ( input.charAt(i) == '1' ) {
                                sum1++;
                        }
                        else {
                                sum0++;
                        }
                }
                if ( sum0 <= sum1 ) {
                        result = sum0 * 2;
                }
                else {
                        result = sum1 * 2;
                }
                System.out.println( result );
                scan.close();
        }
} Main
import java.util.Scanner;
import java.util.Arrays;

public class Main {
        public static void main(String[] args) {
                Scanner scan = new Scanner(System.in);
                String input = scan.nextLine();
                int len = input.length();
                int sum1 = 0;
                int sum0 = 0;
                int result = 0;

                for (int i=0; i<len; i++) {
                        if ( input.charAt(i) == '1' ) {
                                sum1++;
                        }
                        else {
                                sum0++;
                        }
                }
                if ( sum0 <= sum1 ) {
                        result = sum0 * 2;
                }
                else {
                        result = sum1 * 2;
                }
                System.out.println( result );
                scan.close();
        }
}
