import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		try (Scanner sc = new Scanner(System.in)) {
			String S = sc.next();
			int count = 0;
			char target = '0';
			for(char c : S.toCharArray()) {
				if(c == target) {
					count++;
				}
			}
			System.out.println(Math.min(count, S.length() - count) * 2);
		} // Scanner Close
    }
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		try (Scanner sc = new Scanner(System.in)) {
			String S = sc.next();
			int count = 0;
			char target = '0';
			for(char c : S.toCharArray()) {
				if(c == target) {
					count++;
				}
			}
			System.out.println(Math.min(count, S.length() - count) * 2);
		} // Scanner Close
    }
} Main public static void main(String[] args) {

		try (Scanner sc = new Scanner(System.in)) {
			String S = sc.next();
			int count = 0;
			char target = '0';
			for(char c : S.toCharArray()) {
				if(c == target) {
					count++;
				}
			}
			System.out.println(Math.min(count, S.length() - count) * 2);
		} // Scanner Close
    } main {

		try (Scanner sc = new Scanner(System.in)) {
			String S = sc.next();
			int count = 0;
			char target = '0';
			for(char c : S.toCharArray()) {
				if(c == target) {
					count++;
				}
			}
			System.out.println(Math.min(count, S.length() - count) * 2);
		} // Scanner Close
    } try (Scanner sc = new Scanner(System.in)) {
			String S = sc.next();
			int count = 0;
			char target = '0';
			for(char c : S.toCharArray()) {
				if(c == target) {
					count++;
				}
			}
			System.out.println(Math.min(count, S.length() - count) * 2);
		} // Scanner Close {
			String S = sc.next();
			int count = 0;
			char target = '0';
			for(char c : S.toCharArray()) {
				if(c == target) {
					count++;
				}
			}
			System.out.println(Math.min(count, S.length() - count) * 2);
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int count = 0; count 0 char target = '0'; target '0' for(char c : S.toCharArray()) {
				if(c == target) {
					count++;
				}
			} char c S.toCharArray() S.toCharArray S {
				if(c == target) {
					count++;
				}
			} {
				if(c == target) {
					count++;
				}
			} if(c == target) {
					count++;
				} c == target c target {
					count++;
				} count++ count System.out.println(Math.min(count, S.length() - count) * 2) System.out.println System.out System System.out Math.min(count, S.length() - count) * 2 Math.min(count, S.length() - count) Math.min Math count S.length() - count S.length() S.length S count 2 String[] args args public class Main {

	public static void main(String[] args) {

		try (Scanner sc = new Scanner(System.in)) {
			String S = sc.next();
			int count = 0;
			char target = '0';
			for(char c : S.toCharArray()) {
				if(c == target) {
					count++;
				}
			}
			System.out.println(Math.min(count, S.length() - count) * 2);
		} // Scanner Close
    }
} public class Main {

	public static void main(String[] args) {

		try (Scanner sc = new Scanner(System.in)) {
			String S = sc.next();
			int count = 0;
			char target = '0';
			for(char c : S.toCharArray()) {
				if(c == target) {
					count++;
				}
			}
			System.out.println(Math.min(count, S.length() - count) * 2);
		} // Scanner Close
    }
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		try (Scanner sc = new Scanner(System.in)) {
			String S = sc.next();
			int count = 0;
			char target = '0';
			for(char c : S.toCharArray()) {
				if(c == target) {
					count++;
				}
			}
			System.out.println(Math.min(count, S.length() - count) * 2);
		} // Scanner Close
    }
}