import java.util.*;
class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		char[] s=sc.next().toCharArray();
		
		int count1=0,count0=0;
		for(char c:s){
			if(c=='1')
				count1++;
			else
				count0++;
		}
		
		System.out.println(Math.min(count0,count1)*2);
	
	}
	
} import java.util.*; util.* java class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		char[] s=sc.next().toCharArray();
		
		int count1=0,count0=0;
		for(char c:s){
			if(c=='1')
				count1++;
			else
				count0++;
		}
		
		System.out.println(Math.min(count0,count1)*2);
	
	}
	
} Main public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		char[] s=sc.next().toCharArray();
		
		int count1=0,count0=0;
		for(char c:s){
			if(c=='1')
				count1++;
			else
				count0++;
		}
		
		System.out.println(Math.min(count0,count1)*2);
	
	} main {
		Scanner sc=new Scanner(System.in);
		char[] s=sc.next().toCharArray();
		
		int count1=0,count0=0;
		for(char c:s){
			if(c=='1')
				count1++;
			else
				count0++;
		}
		
		System.out.println(Math.min(count0,count1)*2);
	
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) char[] s=sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc int count1=0 count1 0 count0=0; count0 0 for(char c:s){
			if(c=='1')
				count1++;
			else
				count0++;
		} char c s {
			if(c=='1')
				count1++;
			else
				count0++;
		} {
			if(c=='1')
				count1++;
			else
				count0++;
		} if(c=='1')
				count1++;
			else
				count0++; c=='1' c '1' count1++ count1 count0++ count0 System.out.println(Math.min(count0,count1)*2) System.out.println System.out System System.out Math.min(count0,count1)*2 Math.min(count0,count1) Math.min Math count0 count1 2 String[] args args
import java.util.*;
class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		char[] s=sc.next().toCharArray();
		
		int count1=0,count0=0;
		for(char c:s){
			if(c=='1')
				count1++;
			else
				count0++;
		}
		
		System.out.println(Math.min(count0,count1)*2);
	
	}
	
}