import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int count = 0;

		for (int i = 0; i < s.length(); i++) {
			if (s.substring(i, i + 1).equals("0")) {
				count++;
			}
		}

		System.out.println(Math.min(2 * count, 2 * (s.length() - count)));
		sc.close();
	}
} 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();
		int count = 0;

		for (int i = 0; i < s.length(); i++) {
			if (s.substring(i, i + 1).equals("0")) {
				count++;
			}
		}

		System.out.println(Math.min(2 * count, 2 * (s.length() - count)));
		sc.close();
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int count = 0;

		for (int i = 0; i < s.length(); i++) {
			if (s.substring(i, i + 1).equals("0")) {
				count++;
			}
		}

		System.out.println(Math.min(2 * count, 2 * (s.length() - count)));
		sc.close();
	} main {

		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int count = 0;

		for (int i = 0; i < s.length(); i++) {
			if (s.substring(i, i + 1).equals("0")) {
				count++;
			}
		}

		System.out.println(Math.min(2 * count, 2 * (s.length() - count)));
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int count = 0; count 0 for (int i = 0; i < s.length(); i++) {
			if (s.substring(i, i + 1).equals("0")) {
				count++;
			}
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
			if (s.substring(i, i + 1).equals("0")) {
				count++;
			}
		} {
			if (s.substring(i, i + 1).equals("0")) {
				count++;
			}
		} if (s.substring(i, i + 1).equals("0")) {
				count++;
			} s.substring(i, i + 1).equals("0") s.substring(i, i + 1).equals s.substring(i, i + 1) s.substring s i i + 1 i 1 "0" {
				count++;
			} count++ count System.out.println(Math.min(2 * count, 2 * (s.length() - count))) System.out.println System.out System System.out Math.min(2 * count, 2 * (s.length() - count)) Math.min Math 2 * count 2 count 2 * (s.length() - count) 2 (s.length() - count) s.length() s.length s count sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int count = 0;

		for (int i = 0; i < s.length(); i++) {
			if (s.substring(i, i + 1).equals("0")) {
				count++;
			}
		}

		System.out.println(Math.min(2 * count, 2 * (s.length() - count)));
		sc.close();
	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int count = 0;

		for (int i = 0; i < s.length(); i++) {
			if (s.substring(i, i + 1).equals("0")) {
				count++;
			}
		}

		System.out.println(Math.min(2 * count, 2 * (s.length() - count)));
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int count = 0;

		for (int i = 0; i < s.length(); i++) {
			if (s.substring(i, i + 1).equals("0")) {
				count++;
			}
		}

		System.out.println(Math.min(2 * count, 2 * (s.length() - count)));
		sc.close();
	}
}