import java.util.*;
import java.util.Arrays;

public class Main{
        public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                String src = scan.next();
                String Array[] = src.split("");
                List<String> list = Arrays.asList(Array);

                int count0 = Collections.frequency(list, "0");
                int count1 = Collections.frequency(list, "1");

                if(count0 > count1){
                        System.out.println(count1*2);
                }else{
                        System.out.println(count0*2);
                }
        }
} import java.util.*; util.* java import java.util.Arrays; Arrays java.util public class Main{
        public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                String src = scan.next();
                String Array[] = src.split("");
                List<String> list = Arrays.asList(Array);

                int count0 = Collections.frequency(list, "0");
                int count1 = Collections.frequency(list, "1");

                if(count0 > count1){
                        System.out.println(count1*2);
                }else{
                        System.out.println(count0*2);
                }
        }
} Main public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                String src = scan.next();
                String Array[] = src.split("");
                List<String> list = Arrays.asList(Array);

                int count0 = Collections.frequency(list, "0");
                int count1 = Collections.frequency(list, "1");

                if(count0 > count1){
                        System.out.println(count1*2);
                }else{
                        System.out.println(count0*2);
                }
        } main {
                Scanner scan = new Scanner(System.in);
                String src = scan.next();
                String Array[] = src.split("");
                List<String> list = Arrays.asList(Array);

                int count0 = Collections.frequency(list, "0");
                int count1 = Collections.frequency(list, "1");

                if(count0 > count1){
                        System.out.println(count1*2);
                }else{
                        System.out.println(count0*2);
                }
        } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String src = scan.next(); src scan.next() scan.next scan String Array[] = src.split(""); Array src.split("") src.split src "" List<String> list = Arrays.asList(Array); list Arrays.asList(Array) Arrays.asList Arrays Array int count0 = Collections.frequency(list, "0"); count0 Collections.frequency(list, "0") Collections.frequency Collections list "0" int count1 = Collections.frequency(list, "1"); count1 Collections.frequency(list, "1") Collections.frequency Collections list "1" if(count0 > count1){
                        System.out.println(count1*2);
                }else{
                        System.out.println(count0*2);
                } count0 > count1 count0 count1 {
                        System.out.println(count1*2);
                } System.out.println(count1*2) System.out.println System.out System System.out count1*2 count1 2 {
                        System.out.println(count0*2);
                } System.out.println(count0*2) System.out.println System.out System System.out count0*2 count0 2 String[] args args public class Main{
        public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                String src = scan.next();
                String Array[] = src.split("");
                List<String> list = Arrays.asList(Array);

                int count0 = Collections.frequency(list, "0");
                int count1 = Collections.frequency(list, "1");

                if(count0 > count1){
                        System.out.println(count1*2);
                }else{
                        System.out.println(count0*2);
                }
        }
} public class Main{
        public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                String src = scan.next();
                String Array[] = src.split("");
                List<String> list = Arrays.asList(Array);

                int count0 = Collections.frequency(list, "0");
                int count1 = Collections.frequency(list, "1");

                if(count0 > count1){
                        System.out.println(count1*2);
                }else{
                        System.out.println(count0*2);
                }
        }
} Main
import java.util.*;
import java.util.Arrays;

public class Main{
        public static void main(String[] args){
                Scanner scan = new Scanner(System.in);
                String src = scan.next();
                String Array[] = src.split("");
                List<String> list = Arrays.asList(Array);

                int count0 = Collections.frequency(list, "0");
                int count1 = Collections.frequency(list, "1");

                if(count0 > count1){
                        System.out.println(count1*2);
                }else{
                        System.out.println(count0*2);
                }
        }
}