import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split("");

		int blue = 0;
		int red = 0;

		for (int i = 0; i < str.length; i++) {
			if (str[i].equals("0"))
				red++;
			else
				blue++;
		}

		if (blue == 0 || red == 0) {
			System.out.println("0");
		} else {
			int min = Math.min(blue, red);
			System.out.println(min * 2);
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split("");

		int blue = 0;
		int red = 0;

		for (int i = 0; i < str.length; i++) {
			if (str[i].equals("0"))
				red++;
			else
				blue++;
		}

		if (blue == 0 || red == 0) {
			System.out.println("0");
		} else {
			int min = Math.min(blue, red);
			System.out.println(min * 2);
		}
	}
} Main public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split("");

		int blue = 0;
		int red = 0;

		for (int i = 0; i < str.length; i++) {
			if (str[i].equals("0"))
				red++;
			else
				blue++;
		}

		if (blue == 0 || red == 0) {
			System.out.println("0");
		} else {
			int min = Math.min(blue, red);
			System.out.println(min * 2);
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split("");

		int blue = 0;
		int red = 0;

		for (int i = 0; i < str.length; i++) {
			if (str[i].equals("0"))
				red++;
			else
				blue++;
		}

		if (blue == 0 || red == 0) {
			System.out.println("0");
		} else {
			int min = Math.min(blue, red);
			System.out.println(min * 2);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str[] = br.readLine().split(""); str br.readLine().split("") br.readLine().split br.readLine() br.readLine br "" int blue = 0; blue 0 int red = 0; red 0 for (int i = 0; i < str.length; i++) {
			if (str[i].equals("0"))
				red++;
			else
				blue++;
		} int i = 0; int i = 0; i 0 i < str.length i str.length str str.length i++ i++ i {
			if (str[i].equals("0"))
				red++;
			else
				blue++;
		} {
			if (str[i].equals("0"))
				red++;
			else
				blue++;
		} if (str[i].equals("0"))
				red++;
			else
				blue++; str[i].equals("0") str[i].equals str[i] str i "0" red++ red blue++ blue if (blue == 0 || red == 0) {
			System.out.println("0");
		} else {
			int min = Math.min(blue, red);
			System.out.println(min * 2);
		} blue == 0 || red == 0 blue == 0 blue 0 red == 0 red 0 {
			System.out.println("0");
		} System.out.println("0") System.out.println System.out System System.out "0" {
			int min = Math.min(blue, red);
			System.out.println(min * 2);
		} int min = Math.min(blue, red); min Math.min(blue, red) Math.min Math blue red System.out.println(min * 2) System.out.println System.out System System.out min * 2 min 2 String args[] args public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split("");

		int blue = 0;
		int red = 0;

		for (int i = 0; i < str.length; i++) {
			if (str[i].equals("0"))
				red++;
			else
				blue++;
		}

		if (blue == 0 || red == 0) {
			System.out.println("0");
		} else {
			int min = Math.min(blue, red);
			System.out.println(min * 2);
		}
	}
} public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split("");

		int blue = 0;
		int red = 0;

		for (int i = 0; i < str.length; i++) {
			if (str[i].equals("0"))
				red++;
			else
				blue++;
		}

		if (blue == 0 || red == 0) {
			System.out.println("0");
		} else {
			int min = Math.min(blue, red);
			System.out.println(min * 2);
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split("");

		int blue = 0;
		int red = 0;

		for (int i = 0; i < str.length; i++) {
			if (str[i].equals("0"))
				red++;
			else
				blue++;
		}

		if (blue == 0 || red == 0) {
			System.out.println("0");
		} else {
			int min = Math.min(blue, red);
			System.out.println(min * 2);
		}
	}
}
