import java.util.*;

public class Main {
	
	public static void main(String[] args)  {
		Scanner scan = new Scanner(System.in);
		String s=scan.next();
		int len=s.length();
		int count_0=0;
		int count_1=0;
		for (int i=0;i<len;++i) {
			if(s.charAt(i)=='0')++count_0;
			if(s.charAt(i)=='1')++count_1;
		}
		System.out.print(Math.min(count_0,count_1)*2);
}
}
//end import java.util.*; util.* java public class Main {
	
	public static void main(String[] args)  {
		Scanner scan = new Scanner(System.in);
		String s=scan.next();
		int len=s.length();
		int count_0=0;
		int count_1=0;
		for (int i=0;i<len;++i) {
			if(s.charAt(i)=='0')++count_0;
			if(s.charAt(i)=='1')++count_1;
		}
		System.out.print(Math.min(count_0,count_1)*2);
}
} Main public static void main(String[] args)  {
		Scanner scan = new Scanner(System.in);
		String s=scan.next();
		int len=s.length();
		int count_0=0;
		int count_1=0;
		for (int i=0;i<len;++i) {
			if(s.charAt(i)=='0')++count_0;
			if(s.charAt(i)=='1')++count_1;
		}
		System.out.print(Math.min(count_0,count_1)*2);
} main {
		Scanner scan = new Scanner(System.in);
		String s=scan.next();
		int len=s.length();
		int count_0=0;
		int count_1=0;
		for (int i=0;i<len;++i) {
			if(s.charAt(i)=='0')++count_0;
			if(s.charAt(i)=='1')++count_1;
		}
		System.out.print(Math.min(count_0,count_1)*2);
} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s=scan.next(); s scan.next() scan.next scan int len=s.length(); len s.length() s.length s int count_0=0; count_0 0 int count_1=0; count_1 0 for (int i=0;i<len;++i) {
			if(s.charAt(i)=='0')++count_0;
			if(s.charAt(i)=='1')++count_1;
		} int i=0; int i=0; i 0 i<len i len ++i ++i i {
			if(s.charAt(i)=='0')++count_0;
			if(s.charAt(i)=='1')++count_1;
		} {
			if(s.charAt(i)=='0')++count_0;
			if(s.charAt(i)=='1')++count_1;
		} if(s.charAt(i)=='0')++count_0; s.charAt(i)=='0' s.charAt(i) s.charAt s i '0' ++count_0 count_0 if(s.charAt(i)=='1')++count_1; s.charAt(i)=='1' s.charAt(i) s.charAt s i '1' ++count_1 count_1 System.out.print(Math.min(count_0,count_1)*2) System.out.print System.out System System.out Math.min(count_0,count_1)*2 Math.min(count_0,count_1) Math.min Math count_0 count_1 2 String[] args args public class Main {
	
	public static void main(String[] args)  {
		Scanner scan = new Scanner(System.in);
		String s=scan.next();
		int len=s.length();
		int count_0=0;
		int count_1=0;
		for (int i=0;i<len;++i) {
			if(s.charAt(i)=='0')++count_0;
			if(s.charAt(i)=='1')++count_1;
		}
		System.out.print(Math.min(count_0,count_1)*2);
}
} public class Main {
	
	public static void main(String[] args)  {
		Scanner scan = new Scanner(System.in);
		String s=scan.next();
		int len=s.length();
		int count_0=0;
		int count_1=0;
		for (int i=0;i<len;++i) {
			if(s.charAt(i)=='0')++count_0;
			if(s.charAt(i)=='1')++count_1;
		}
		System.out.print(Math.min(count_0,count_1)*2);
}
} Main
import java.util.*;

public class Main {
	
	public static void main(String[] args)  {
		Scanner scan = new Scanner(System.in);
		String s=scan.next();
		int len=s.length();
		int count_0=0;
		int count_1=0;
		for (int i=0;i<len;++i) {
			if(s.charAt(i)=='0')++count_0;
			if(s.charAt(i)=='1')++count_1;
		}
		System.out.print(Math.min(count_0,count_1)*2);
}
}
//end
