import java.util.*;
 
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int count = 0;

		for(int i=0; i<S.length(); i++){
			String str = String.valueOf(S.charAt(i));
			if(str.equals("0")){
				count++;
			}
		}

		System.out.println(Math.min(count, S.length()-count)*2);
    }
} 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 count = 0;

		for(int i=0; i<S.length(); i++){
			String str = String.valueOf(S.charAt(i));
			if(str.equals("0")){
				count++;
			}
		}

		System.out.println(Math.min(count, S.length()-count)*2);
    }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int count = 0;

		for(int i=0; i<S.length(); i++){
			String str = String.valueOf(S.charAt(i));
			if(str.equals("0")){
				count++;
			}
		}

		System.out.println(Math.min(count, S.length()-count)*2);
    } main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int count = 0;

		for(int i=0; i<S.length(); i++){
			String str = String.valueOf(S.charAt(i));
			if(str.equals("0")){
				count++;
			}
		}

		System.out.println(Math.min(count, S.length()-count)*2);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int count = 0; count 0 for(int i=0; i<S.length(); i++){
			String str = String.valueOf(S.charAt(i));
			if(str.equals("0")){
				count++;
			}
		} int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
			String str = String.valueOf(S.charAt(i));
			if(str.equals("0")){
				count++;
			}
		} {
			String str = String.valueOf(S.charAt(i));
			if(str.equals("0")){
				count++;
			}
		} String str = String.valueOf(S.charAt(i)); str String.valueOf(S.charAt(i)) String.valueOf String S.charAt(i) S.charAt S i if(str.equals("0")){
				count++;
			} str.equals("0") str.equals str "0" {
				count++;
			} count++ count System.out.println(Math.min(count, S.length()-count)*2) System.out.println System.out System System.out Math.min(count, S.length()-count)*2 Math.min(count, S.length()-count) Math.min Math count S.length()-count S.length() S.length S count 2 String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int count = 0;

		for(int i=0; i<S.length(); i++){
			String str = String.valueOf(S.charAt(i));
			if(str.equals("0")){
				count++;
			}
		}

		System.out.println(Math.min(count, S.length()-count)*2);
    }
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int count = 0;

		for(int i=0; i<S.length(); i++){
			String str = String.valueOf(S.charAt(i));
			if(str.equals("0")){
				count++;
			}
		}

		System.out.println(Math.min(count, S.length()-count)*2);
    }
} Main
import java.util.*;
 
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int count = 0;

		for(int i=0; i<S.length(); i++){
			String str = String.valueOf(S.charAt(i));
			if(str.equals("0")){
				count++;
			}
		}

		System.out.println(Math.min(count, S.length()-count)*2);
    }
}
