import java.util.Scanner;
public class Main{
	
	public static void main(String[]args){
	Scanner scan=new Scanner(System.in);
		String a=scan.next();
		int count0=0;
		int count1=0;
		for(int i=0;i<a.length();i++) {
			char ch=a.charAt(i);
			if(ch=='0') {
				count0++;
			}
			else {
				count1++;
			}
		}
		System.out.println(count1>count0?count0*2:count1*2);
	}
} import java.util.Scanner; Scanner java.util public class Main{
	
	public static void main(String[]args){
	Scanner scan=new Scanner(System.in);
		String a=scan.next();
		int count0=0;
		int count1=0;
		for(int i=0;i<a.length();i++) {
			char ch=a.charAt(i);
			if(ch=='0') {
				count0++;
			}
			else {
				count1++;
			}
		}
		System.out.println(count1>count0?count0*2:count1*2);
	}
} Main public static void main(String[]args){
	Scanner scan=new Scanner(System.in);
		String a=scan.next();
		int count0=0;
		int count1=0;
		for(int i=0;i<a.length();i++) {
			char ch=a.charAt(i);
			if(ch=='0') {
				count0++;
			}
			else {
				count1++;
			}
		}
		System.out.println(count1>count0?count0*2:count1*2);
	} main {
	Scanner scan=new Scanner(System.in);
		String a=scan.next();
		int count0=0;
		int count1=0;
		for(int i=0;i<a.length();i++) {
			char ch=a.charAt(i);
			if(ch=='0') {
				count0++;
			}
			else {
				count1++;
			}
		}
		System.out.println(count1>count0?count0*2:count1*2);
	} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) String a=scan.next(); a scan.next() scan.next scan int count0=0; count0 0 int count1=0; count1 0 for(int i=0;i<a.length();i++) {
			char ch=a.charAt(i);
			if(ch=='0') {
				count0++;
			}
			else {
				count1++;
			}
		} int i=0; int i=0; i 0 i<a.length() i a.length() a.length a i++ i++ i {
			char ch=a.charAt(i);
			if(ch=='0') {
				count0++;
			}
			else {
				count1++;
			}
		} {
			char ch=a.charAt(i);
			if(ch=='0') {
				count0++;
			}
			else {
				count1++;
			}
		} char ch=a.charAt(i); ch a.charAt(i) a.charAt a i if(ch=='0') {
				count0++;
			}
			else {
				count1++;
			} ch=='0' ch '0' {
				count0++;
			} count0++ count0 {
				count1++;
			} count1++ count1 System.out.println(count1>count0?count0*2:count1*2) System.out.println System.out System System.out count1>count0?count0*2:count1*2 count1>count0 count1 count0 count0*2 count0 2 count1*2 count1 2 String[]args args public class Main{
	
	public static void main(String[]args){
	Scanner scan=new Scanner(System.in);
		String a=scan.next();
		int count0=0;
		int count1=0;
		for(int i=0;i<a.length();i++) {
			char ch=a.charAt(i);
			if(ch=='0') {
				count0++;
			}
			else {
				count1++;
			}
		}
		System.out.println(count1>count0?count0*2:count1*2);
	}
} public class Main{
	
	public static void main(String[]args){
	Scanner scan=new Scanner(System.in);
		String a=scan.next();
		int count0=0;
		int count1=0;
		for(int i=0;i<a.length();i++) {
			char ch=a.charAt(i);
			if(ch=='0') {
				count0++;
			}
			else {
				count1++;
			}
		}
		System.out.println(count1>count0?count0*2:count1*2);
	}
} Main
import java.util.Scanner;
public class Main{
	
	public static void main(String[]args){
	Scanner scan=new Scanner(System.in);
		String a=scan.next();
		int count0=0;
		int count1=0;
		for(int i=0;i<a.length();i++) {
			char ch=a.charAt(i);
			if(ch=='0') {
				count0++;
			}
			else {
				count1++;
			}
		}
		System.out.println(count1>count0?count0*2:count1*2);
	}
}