import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int z = 0;
		int o = 0;
		for(int i = 0;i < c.length; i++) {
			if(c[i] == '0') {
				z++;
			}
			else {
				o++;
			}
		}
		System.out.println(Math.min(z, o)*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();
		char[] c = s.toCharArray();
		int z = 0;
		int o = 0;
		for(int i = 0;i < c.length; i++) {
			if(c[i] == '0') {
				z++;
			}
			else {
				o++;
			}
		}
		System.out.println(Math.min(z, o)*2);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int z = 0;
		int o = 0;
		for(int i = 0;i < c.length; i++) {
			if(c[i] == '0') {
				z++;
			}
			else {
				o++;
			}
		}
		System.out.println(Math.min(z, o)*2);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int z = 0;
		int o = 0;
		for(int i = 0;i < c.length; i++) {
			if(c[i] == '0') {
				z++;
			}
			else {
				o++;
			}
		}
		System.out.println(Math.min(z, o)*2);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc char[] c = s.toCharArray(); c s.toCharArray() s.toCharArray s int z = 0; z 0 int o = 0; o 0 for(int i = 0;i < c.length; i++) {
			if(c[i] == '0') {
				z++;
			}
			else {
				o++;
			}
		} int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
			if(c[i] == '0') {
				z++;
			}
			else {
				o++;
			}
		} {
			if(c[i] == '0') {
				z++;
			}
			else {
				o++;
			}
		} if(c[i] == '0') {
				z++;
			}
			else {
				o++;
			} c[i] == '0' c[i] c i '0' {
				z++;
			} z++ z {
				o++;
			} o++ o System.out.println(Math.min(z, o)*2) System.out.println System.out System System.out Math.min(z, o)*2 Math.min(z, o) Math.min Math z o 2 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int z = 0;
		int o = 0;
		for(int i = 0;i < c.length; i++) {
			if(c[i] == '0') {
				z++;
			}
			else {
				o++;
			}
		}
		System.out.println(Math.min(z, o)*2);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int z = 0;
		int o = 0;
		for(int i = 0;i < c.length; i++) {
			if(c[i] == '0') {
				z++;
			}
			else {
				o++;
			}
		}
		System.out.println(Math.min(z, o)*2);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int z = 0;
		int o = 0;
		for(int i = 0;i < c.length; i++) {
			if(c[i] == '0') {
				z++;
			}
			else {
				o++;
			}
		}
		System.out.println(Math.min(z, o)*2);
	}
}
