import java.util.Scanner;
import java.util.TreeMap;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 値を取得
		String s = sc.next();
		int z = 0, o = 0;

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

		System.out.println((2 * Math.min(z, o)));

		sc.close();
	}
} import java.util.Scanner; Scanner java.util import java.util.TreeMap; TreeMap java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 値を取得
		String s = sc.next();
		int z = 0, o = 0;

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

		System.out.println((2 * Math.min(z, o)));

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 値を取得
		String s = sc.next();
		int z = 0, o = 0;

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

		System.out.println((2 * Math.min(z, o)));

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		// 値を取得
		String s = sc.next();
		int z = 0, o = 0;

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

		System.out.println((2 * Math.min(z, o)));

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int z = 0 z 0 o = 0; o 0 for (int i = 0; i < s.length(); i++) {
			if (s.substring(i, i + 1).equals("0")) {
				z++;
			} else {
				o++;
			}
		} 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")) {
				z++;
			} else {
				o++;
			}
		} {
			if (s.substring(i, i + 1).equals("0")) {
				z++;
			} else {
				o++;
			}
		} if (s.substring(i, i + 1).equals("0")) {
				z++;
			} else {
				o++;
			} 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" {
				z++;
			} z++ z {
				o++;
			} o++ o System.out.println((2 * Math.min(z, o))) System.out.println System.out System System.out (2 * Math.min(z, o)) 2 Math.min(z, o) Math.min Math z o 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 z = 0, o = 0;

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

		System.out.println((2 * Math.min(z, o)));

		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 値を取得
		String s = sc.next();
		int z = 0, o = 0;

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

		System.out.println((2 * Math.min(z, o)));

		sc.close();
	}
} Main
import java.util.Scanner;
import java.util.TreeMap;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 値を取得
		String s = sc.next();
		int z = 0, o = 0;

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

		System.out.println((2 * Math.min(z, o)));

		sc.close();
	}
}
