import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		String[] inputSplit = input.split("");
		int num0 = 0;
		for (int i = 0; i < inputSplit.length; i++) {
			if (inputSplit[i].equals("0")) {
				num0++;
			}
		}
		System.out.print(Math.min(num0, inputSplit.length - num0) * 2);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		String[] inputSplit = input.split("");
		int num0 = 0;
		for (int i = 0; i < inputSplit.length; i++) {
			if (inputSplit[i].equals("0")) {
				num0++;
			}
		}
		System.out.print(Math.min(num0, inputSplit.length - num0) * 2);
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		String[] inputSplit = input.split("");
		int num0 = 0;
		for (int i = 0; i < inputSplit.length; i++) {
			if (inputSplit[i].equals("0")) {
				num0++;
			}
		}
		System.out.print(Math.min(num0, inputSplit.length - num0) * 2);
	} main {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		String[] inputSplit = input.split("");
		int num0 = 0;
		for (int i = 0; i < inputSplit.length; i++) {
			if (inputSplit[i].equals("0")) {
				num0++;
			}
		}
		System.out.print(Math.min(num0, inputSplit.length - num0) * 2);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.next(); input sc.next() sc.next sc String[] inputSplit = input.split(""); inputSplit input.split("") input.split input "" int num0 = 0; num0 0 for (int i = 0; i < inputSplit.length; i++) {
			if (inputSplit[i].equals("0")) {
				num0++;
			}
		} int i = 0; int i = 0; i 0 i < inputSplit.length i inputSplit.length inputSplit inputSplit.length i++ i++ i {
			if (inputSplit[i].equals("0")) {
				num0++;
			}
		} {
			if (inputSplit[i].equals("0")) {
				num0++;
			}
		} if (inputSplit[i].equals("0")) {
				num0++;
			} inputSplit[i].equals("0") inputSplit[i].equals inputSplit[i] inputSplit i "0" {
				num0++;
			} num0++ num0 System.out.print(Math.min(num0, inputSplit.length - num0) * 2) System.out.print System.out System System.out Math.min(num0, inputSplit.length - num0) * 2 Math.min(num0, inputSplit.length - num0) Math.min Math num0 inputSplit.length - num0 inputSplit.length inputSplit inputSplit.length num0 2 String[] args args public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		String[] inputSplit = input.split("");
		int num0 = 0;
		for (int i = 0; i < inputSplit.length; i++) {
			if (inputSplit[i].equals("0")) {
				num0++;
			}
		}
		System.out.print(Math.min(num0, inputSplit.length - num0) * 2);
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		String[] inputSplit = input.split("");
		int num0 = 0;
		for (int i = 0; i < inputSplit.length; i++) {
			if (inputSplit[i].equals("0")) {
				num0++;
			}
		}
		System.out.print(Math.min(num0, inputSplit.length - num0) * 2);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		String[] inputSplit = input.split("");
		int num0 = 0;
		for (int i = 0; i < inputSplit.length; i++) {
			if (inputSplit[i].equals("0")) {
				num0++;
			}
		}
		System.out.print(Math.min(num0, inputSplit.length - num0) * 2);
	}
}