import java.util.Scanner;

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

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