import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int answer = 0;

		answer = Math.min(S.replace("0", "").length(), S.replace("1", "").length()) * 2;

		System.out.println(answer);
	}
} 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 answer = 0;

		answer = Math.min(S.replace("0", "").length(), S.replace("1", "").length()) * 2;

		System.out.println(answer);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int answer = 0;

		answer = Math.min(S.replace("0", "").length(), S.replace("1", "").length()) * 2;

		System.out.println(answer);
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int answer = 0;

		answer = Math.min(S.replace("0", "").length(), S.replace("1", "").length()) * 2;

		System.out.println(answer);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int answer = 0; answer 0 answer = Math.min(S.replace("0", "").length(), S.replace("1", "").length()) * 2 answer Math.min(S.replace("0", "").length(), S.replace("1", "").length()) * 2 Math.min(S.replace("0", "").length(), S.replace("1", "").length()) Math.min Math S.replace("0", "").length() S.replace("0", "").length S.replace("0", "") S.replace S "0" "" S.replace("1", "").length() S.replace("1", "").length S.replace("1", "") S.replace S "1" "" 2 System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int answer = 0;

		answer = Math.min(S.replace("0", "").length(), S.replace("1", "").length()) * 2;

		System.out.println(answer);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int answer = 0;

		answer = Math.min(S.replace("0", "").length(), S.replace("1", "").length()) * 2;

		System.out.println(answer);
	}
} 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 answer = 0;

		answer = Math.min(S.replace("0", "").length(), S.replace("1", "").length()) * 2;

		System.out.println(answer);
	}
}