import java.util.*;
 
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String[] s=a.split("");
		int r=0;
		int b=0;
		for(int i=0;i<s.length;i++){
			if(s[i].equals("0"))r++;
			if(s[i].equals("1"))b++;
		}
		System.out.print(chmin(r,b)*2);
	}
	private static int chmax(int a,int b){
		if(a>b) return a;
		else return b;
	}
	private static int chmin(int a,int b){
		if(a<b) return a;
		else return b;
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String[] s=a.split("");
		int r=0;
		int b=0;
		for(int i=0;i<s.length;i++){
			if(s[i].equals("0"))r++;
			if(s[i].equals("1"))b++;
		}
		System.out.print(chmin(r,b)*2);
	}
	private static int chmax(int a,int b){
		if(a>b) return a;
		else return b;
	}
	private static int chmin(int a,int b){
		if(a<b) return a;
		else return b;
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String[] s=a.split("");
		int r=0;
		int b=0;
		for(int i=0;i<s.length;i++){
			if(s[i].equals("0"))r++;
			if(s[i].equals("1"))b++;
		}
		System.out.print(chmin(r,b)*2);
	} main {
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String[] s=a.split("");
		int r=0;
		int b=0;
		for(int i=0;i<s.length;i++){
			if(s[i].equals("0"))r++;
			if(s[i].equals("1"))b++;
		}
		System.out.print(chmin(r,b)*2);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc String[] s=a.split(""); s a.split("") a.split a "" int r=0; r 0 int b=0; b 0 for(int i=0;i<s.length;i++){
			if(s[i].equals("0"))r++;
			if(s[i].equals("1"))b++;
		} int i=0; int i=0; i 0 i<s.length i s.length s s.length i++ i++ i {
			if(s[i].equals("0"))r++;
			if(s[i].equals("1"))b++;
		} {
			if(s[i].equals("0"))r++;
			if(s[i].equals("1"))b++;
		} if(s[i].equals("0"))r++; s[i].equals("0") s[i].equals s[i] s i "0" r++ r if(s[i].equals("1"))b++; s[i].equals("1") s[i].equals s[i] s i "1" b++ b System.out.print(chmin(r,b)*2) System.out.print System.out System System.out chmin(r,b)*2 chmin(r,b) chmin r b 2 String[] args args private static int chmax(int a,int b){
		if(a>b) return a;
		else return b;
	} chmax {
		if(a>b) return a;
		else return b;
	} if(a>b) return a;
		else return b; a>b a b return a; a return b; b int a a int b b private static int chmin(int a,int b){
		if(a<b) return a;
		else return b;
	} chmin {
		if(a<b) return a;
		else return b;
	} if(a<b) return a;
		else return b; a<b a b return a; a return b; b int a a int b b public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String[] s=a.split("");
		int r=0;
		int b=0;
		for(int i=0;i<s.length;i++){
			if(s[i].equals("0"))r++;
			if(s[i].equals("1"))b++;
		}
		System.out.print(chmin(r,b)*2);
	}
	private static int chmax(int a,int b){
		if(a>b) return a;
		else return b;
	}
	private static int chmin(int a,int b){
		if(a<b) return a;
		else return b;
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String[] s=a.split("");
		int r=0;
		int b=0;
		for(int i=0;i<s.length;i++){
			if(s[i].equals("0"))r++;
			if(s[i].equals("1"))b++;
		}
		System.out.print(chmin(r,b)*2);
	}
	private static int chmax(int a,int b){
		if(a>b) return a;
		else return b;
	}
	private static int chmin(int a,int b){
		if(a<b) return a;
		else return b;
	}
} Main
import java.util.*;
 
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String[] s=a.split("");
		int r=0;
		int b=0;
		for(int i=0;i<s.length;i++){
			if(s[i].equals("0"))r++;
			if(s[i].equals("1"))b++;
		}
		System.out.print(chmin(r,b)*2);
	}
	private static int chmax(int a,int b){
		if(a>b) return a;
		else return b;
	}
	private static int chmin(int a,int b){
		if(a<b) return a;
		else return b;
	}
}