import java.io.*;
import java.util.*;
import java.lang.*;
import java.text.*;
import java.math.*;
public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader re=new BufferedReader(new InputStreamReader(System.in));
		//StringTokenizer t=new StringTokenizer(re.readLine());
		//int a=Integer.parseInt(t.nextToken()),b=Integer.parseInt(t.nextToken()),k=Integer.parseInt(t.nextToken());
		String str=re.readLine();
		int a=0;
		for(int i=0;i<str.length();++i) {
			if(str.charAt(i)=='1')++a;
		}
		System.out.println(2*Math.min(a,str.length()-a));
	}
} import java.io.*; io.* java import java.util.*; util.* java import java.lang.*; lang.* java import java.text.*; text.* java import java.math.*; math.* java public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader re=new BufferedReader(new InputStreamReader(System.in));
		//StringTokenizer t=new StringTokenizer(re.readLine());
		//int a=Integer.parseInt(t.nextToken()),b=Integer.parseInt(t.nextToken()),k=Integer.parseInt(t.nextToken());
		String str=re.readLine();
		int a=0;
		for(int i=0;i<str.length();++i) {
			if(str.charAt(i)=='1')++a;
		}
		System.out.println(2*Math.min(a,str.length()-a));
	}
} Main public static void main(String[] args) throws IOException{
		BufferedReader re=new BufferedReader(new InputStreamReader(System.in));
		//StringTokenizer t=new StringTokenizer(re.readLine());
		//int a=Integer.parseInt(t.nextToken()),b=Integer.parseInt(t.nextToken()),k=Integer.parseInt(t.nextToken());
		String str=re.readLine();
		int a=0;
		for(int i=0;i<str.length();++i) {
			if(str.charAt(i)=='1')++a;
		}
		System.out.println(2*Math.min(a,str.length()-a));
	} main {
		BufferedReader re=new BufferedReader(new InputStreamReader(System.in));
		//StringTokenizer t=new StringTokenizer(re.readLine());
		//int a=Integer.parseInt(t.nextToken()),b=Integer.parseInt(t.nextToken()),k=Integer.parseInt(t.nextToken());
		String str=re.readLine();
		int a=0;
		for(int i=0;i<str.length();++i) {
			if(str.charAt(i)=='1')++a;
		}
		System.out.println(2*Math.min(a,str.length()-a));
	} BufferedReader re=new BufferedReader(new InputStreamReader(System.in)); re new BufferedReader(new InputStreamReader(System.in)) String str=re.readLine(); str re.readLine() re.readLine re int a=0; a 0 for(int i=0;i<str.length();++i) {
			if(str.charAt(i)=='1')++a;
		} int i=0; int i=0; i 0 i<str.length() i str.length() str.length str ++i ++i i {
			if(str.charAt(i)=='1')++a;
		} {
			if(str.charAt(i)=='1')++a;
		} if(str.charAt(i)=='1')++a; str.charAt(i)=='1' str.charAt(i) str.charAt str i '1' ++a a System.out.println(2*Math.min(a,str.length()-a)) System.out.println System.out System System.out 2*Math.min(a,str.length()-a) 2 Math.min(a,str.length()-a) Math.min Math a str.length()-a str.length() str.length str a String[] args args public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader re=new BufferedReader(new InputStreamReader(System.in));
		//StringTokenizer t=new StringTokenizer(re.readLine());
		//int a=Integer.parseInt(t.nextToken()),b=Integer.parseInt(t.nextToken()),k=Integer.parseInt(t.nextToken());
		String str=re.readLine();
		int a=0;
		for(int i=0;i<str.length();++i) {
			if(str.charAt(i)=='1')++a;
		}
		System.out.println(2*Math.min(a,str.length()-a));
	}
} public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader re=new BufferedReader(new InputStreamReader(System.in));
		//StringTokenizer t=new StringTokenizer(re.readLine());
		//int a=Integer.parseInt(t.nextToken()),b=Integer.parseInt(t.nextToken()),k=Integer.parseInt(t.nextToken());
		String str=re.readLine();
		int a=0;
		for(int i=0;i<str.length();++i) {
			if(str.charAt(i)=='1')++a;
		}
		System.out.println(2*Math.min(a,str.length()-a));
	}
} Main
import java.io.*;
import java.util.*;
import java.lang.*;
import java.text.*;
import java.math.*;
public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader re=new BufferedReader(new InputStreamReader(System.in));
		//StringTokenizer t=new StringTokenizer(re.readLine());
		//int a=Integer.parseInt(t.nextToken()),b=Integer.parseInt(t.nextToken()),k=Integer.parseInt(t.nextToken());
		String str=re.readLine();
		int a=0;
		for(int i=0;i<str.length();++i) {
			if(str.charAt(i)=='1')++a;
		}
		System.out.println(2*Math.min(a,str.length()-a));
	}
}
