import java.util.*;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String S = keyboard.next();
		int z = 0;
		int o = 0;
		
		for(int s=0; s<S.length(); s++){
		if(S.charAt(s) == '0'){
				z++;
		}else{
		o++;		
		}
}
		
		System.out.println(2*Math.min(z,o));
		keyboard.close();	
		
	}
} import java.util.*; util.* java public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String S = keyboard.next();
		int z = 0;
		int o = 0;
		
		for(int s=0; s<S.length(); s++){
		if(S.charAt(s) == '0'){
				z++;
		}else{
		o++;		
		}
}
		
		System.out.println(2*Math.min(z,o));
		keyboard.close();	
		
	}
} Main public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String S = keyboard.next();
		int z = 0;
		int o = 0;
		
		for(int s=0; s<S.length(); s++){
		if(S.charAt(s) == '0'){
				z++;
		}else{
		o++;		
		}
}
		
		System.out.println(2*Math.min(z,o));
		keyboard.close();	
		
	} main {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String S = keyboard.next();
		int z = 0;
		int o = 0;
		
		for(int s=0; s<S.length(); s++){
		if(S.charAt(s) == '0'){
				z++;
		}else{
		o++;		
		}
}
		
		System.out.println(2*Math.min(z,o));
		keyboard.close();	
		
	} Scanner keyboard = new Scanner(System.in); keyboard new Scanner(System.in) String S = keyboard.next(); S keyboard.next() keyboard.next keyboard int z = 0; z 0 int o = 0; o 0 for(int s=0; s<S.length(); s++){
		if(S.charAt(s) == '0'){
				z++;
		}else{
		o++;		
		}
} int s=0; int s=0; s 0 s<S.length() s S.length() S.length S s++ s++ s {
		if(S.charAt(s) == '0'){
				z++;
		}else{
		o++;		
		}
} {
		if(S.charAt(s) == '0'){
				z++;
		}else{
		o++;		
		}
} if(S.charAt(s) == '0'){
				z++;
		}else{
		o++;		
		} S.charAt(s) == '0' S.charAt(s) S.charAt S s '0' {
				z++;
		} z++ z {
		o++;		
		} o++ o System.out.println(2*Math.min(z,o)) System.out.println System.out System System.out 2*Math.min(z,o) 2 Math.min(z,o) Math.min Math z o keyboard.close() keyboard.close keyboard String[] args args public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String S = keyboard.next();
		int z = 0;
		int o = 0;
		
		for(int s=0; s<S.length(); s++){
		if(S.charAt(s) == '0'){
				z++;
		}else{
		o++;		
		}
}
		
		System.out.println(2*Math.min(z,o));
		keyboard.close();	
		
	}
} public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String S = keyboard.next();
		int z = 0;
		int o = 0;
		
		for(int s=0; s<S.length(); s++){
		if(S.charAt(s) == '0'){
				z++;
		}else{
		o++;		
		}
}
		
		System.out.println(2*Math.min(z,o));
		keyboard.close();	
		
	}
} Main
import java.util.*;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String S = keyboard.next();
		int z = 0;
		int o = 0;
		
		for(int s=0; s<S.length(); s++){
		if(S.charAt(s) == '0'){
				z++;
		}else{
		o++;		
		}
}
		
		System.out.println(2*Math.min(z,o));
		keyboard.close();	
		
	}
}
