import java.util.Scanner;

public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String temp = scanner.nextLine();

		int A = 0;
		int B = 0;

		for(int i = 0; i < temp.length(); i++) {

			int a = temp.charAt(i) - 48;

			if(a == 0) {
				A++;
			}else {
				B++;
			}

		}


		System.out.println(Math.min(A, B) * 2);


	}

} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String temp = scanner.nextLine();

		int A = 0;
		int B = 0;

		for(int i = 0; i < temp.length(); i++) {

			int a = temp.charAt(i) - 48;

			if(a == 0) {
				A++;
			}else {
				B++;
			}

		}


		System.out.println(Math.min(A, B) * 2);


	}

} Main public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String temp = scanner.nextLine();

		int A = 0;
		int B = 0;

		for(int i = 0; i < temp.length(); i++) {

			int a = temp.charAt(i) - 48;

			if(a == 0) {
				A++;
			}else {
				B++;
			}

		}


		System.out.println(Math.min(A, B) * 2);


	} main {

		Scanner scanner = new Scanner(System.in);
		String temp = scanner.nextLine();

		int A = 0;
		int B = 0;

		for(int i = 0; i < temp.length(); i++) {

			int a = temp.charAt(i) - 48;

			if(a == 0) {
				A++;
			}else {
				B++;
			}

		}


		System.out.println(Math.min(A, B) * 2);


	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String temp = scanner.nextLine(); temp scanner.nextLine() scanner.nextLine scanner int A = 0; A 0 int B = 0; B 0 for(int i = 0; i < temp.length(); i++) {

			int a = temp.charAt(i) - 48;

			if(a == 0) {
				A++;
			}else {
				B++;
			}

		} int i = 0; int i = 0; i 0 i < temp.length() i temp.length() temp.length temp i++ i++ i {

			int a = temp.charAt(i) - 48;

			if(a == 0) {
				A++;
			}else {
				B++;
			}

		} {

			int a = temp.charAt(i) - 48;

			if(a == 0) {
				A++;
			}else {
				B++;
			}

		} int a = temp.charAt(i) - 48; a temp.charAt(i) - 48 temp.charAt(i) temp.charAt temp i 48 if(a == 0) {
				A++;
			}else {
				B++;
			} a == 0 a 0 {
				A++;
			} A++ A {
				B++;
			} B++ B System.out.println(Math.min(A, B) * 2) System.out.println System.out System System.out Math.min(A, B) * 2 Math.min(A, B) Math.min Math A B 2 String[] args args public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String temp = scanner.nextLine();

		int A = 0;
		int B = 0;

		for(int i = 0; i < temp.length(); i++) {

			int a = temp.charAt(i) - 48;

			if(a == 0) {
				A++;
			}else {
				B++;
			}

		}


		System.out.println(Math.min(A, B) * 2);


	}

} public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String temp = scanner.nextLine();

		int A = 0;
		int B = 0;

		for(int i = 0; i < temp.length(); i++) {

			int a = temp.charAt(i) - 48;

			if(a == 0) {
				A++;
			}else {
				B++;
			}

		}


		System.out.println(Math.min(A, B) * 2);


	}

} Main
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String temp = scanner.nextLine();

		int A = 0;
		int B = 0;

		for(int i = 0; i < temp.length(); i++) {

			int a = temp.charAt(i) - 48;

			if(a == 0) {
				A++;
			}else {
				B++;
			}

		}


		System.out.println(Math.min(A, B) * 2);


	}

}
