import java.util.*;
public class Main{
	public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int counter1 = 0,counter0 = 0;
	String N = sc.next();
	String S[] = new String[N.length()];
		for(int i=0; i<N.length(); i++){
		S[i] = String.valueOf(N.charAt(i));
			if(S[i].equals("1")){
			counter1++;
			}
          	else{
			counter0++;
			}
		}
		System.out.println(Math.min(counter0*2,counter1*2));
		
	}
}	

			 import java.util.*; util.* java public class Main{
	public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int counter1 = 0,counter0 = 0;
	String N = sc.next();
	String S[] = new String[N.length()];
		for(int i=0; i<N.length(); i++){
		S[i] = String.valueOf(N.charAt(i));
			if(S[i].equals("1")){
			counter1++;
			}
          	else{
			counter0++;
			}
		}
		System.out.println(Math.min(counter0*2,counter1*2));
		
	}
} Main public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int counter1 = 0,counter0 = 0;
	String N = sc.next();
	String S[] = new String[N.length()];
		for(int i=0; i<N.length(); i++){
		S[i] = String.valueOf(N.charAt(i));
			if(S[i].equals("1")){
			counter1++;
			}
          	else{
			counter0++;
			}
		}
		System.out.println(Math.min(counter0*2,counter1*2));
		
	} main {
	Scanner sc = new Scanner(System.in);
	int counter1 = 0,counter0 = 0;
	String N = sc.next();
	String S[] = new String[N.length()];
		for(int i=0; i<N.length(); i++){
		S[i] = String.valueOf(N.charAt(i));
			if(S[i].equals("1")){
			counter1++;
			}
          	else{
			counter0++;
			}
		}
		System.out.println(Math.min(counter0*2,counter1*2));
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int counter1 = 0 counter1 0 counter0 = 0; counter0 0 String N = sc.next(); N sc.next() sc.next sc String S[] = new String[N.length()]; S new String[N.length()] N.length() N.length N for(int i=0; i<N.length(); i++){
		S[i] = String.valueOf(N.charAt(i));
			if(S[i].equals("1")){
			counter1++;
			}
          	else{
			counter0++;
			}
		} int i=0; int i=0; i 0 i<N.length() i N.length() N.length N i++ i++ i {
		S[i] = String.valueOf(N.charAt(i));
			if(S[i].equals("1")){
			counter1++;
			}
          	else{
			counter0++;
			}
		} {
		S[i] = String.valueOf(N.charAt(i));
			if(S[i].equals("1")){
			counter1++;
			}
          	else{
			counter0++;
			}
		} S[i] = String.valueOf(N.charAt(i)) S[i] S i String.valueOf(N.charAt(i)) String.valueOf String N.charAt(i) N.charAt N i if(S[i].equals("1")){
			counter1++;
			}
          	else{
			counter0++;
			} S[i].equals("1") S[i].equals S[i] S i "1" {
			counter1++;
			} counter1++ counter1 {
			counter0++;
			} counter0++ counter0 System.out.println(Math.min(counter0*2,counter1*2)) System.out.println System.out System System.out Math.min(counter0*2,counter1*2) Math.min Math counter0*2 counter0 2 counter1*2 counter1 2 String[] args args public class Main{
	public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int counter1 = 0,counter0 = 0;
	String N = sc.next();
	String S[] = new String[N.length()];
		for(int i=0; i<N.length(); i++){
		S[i] = String.valueOf(N.charAt(i));
			if(S[i].equals("1")){
			counter1++;
			}
          	else{
			counter0++;
			}
		}
		System.out.println(Math.min(counter0*2,counter1*2));
		
	}
} public class Main{
	public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int counter1 = 0,counter0 = 0;
	String N = sc.next();
	String S[] = new String[N.length()];
		for(int i=0; i<N.length(); i++){
		S[i] = String.valueOf(N.charAt(i));
			if(S[i].equals("1")){
			counter1++;
			}
          	else{
			counter0++;
			}
		}
		System.out.println(Math.min(counter0*2,counter1*2));
		
	}
} Main
import java.util.*;
public class Main{
	public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int counter1 = 0,counter0 = 0;
	String N = sc.next();
	String S[] = new String[N.length()];
		for(int i=0; i<N.length(); i++){
		S[i] = String.valueOf(N.charAt(i));
			if(S[i].equals("1")){
			counter1++;
			}
          	else{
			counter0++;
			}
		}
		System.out.println(Math.min(counter0*2,counter1*2));
		
	}
}	

			