

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String cubes = sc.nextLine();

		String cubeArray[] = cubes.split("");
		int arrayLength = cubeArray.length;
		int redCount = 0, blueCount = 0;
		for (String cube : cubeArray) {
			if (cube.equals("1")) {
				blueCount++;
			} else {
				redCount++;
			}
		}
		int remainderCubes = Math.abs(blueCount - redCount);
		System.out.println(arrayLength - remainderCubes);
	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String cubes = sc.nextLine();

		String cubeArray[] = cubes.split("");
		int arrayLength = cubeArray.length;
		int redCount = 0, blueCount = 0;
		for (String cube : cubeArray) {
			if (cube.equals("1")) {
				blueCount++;
			} else {
				redCount++;
			}
		}
		int remainderCubes = Math.abs(blueCount - redCount);
		System.out.println(arrayLength - remainderCubes);
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String cubes = sc.nextLine();

		String cubeArray[] = cubes.split("");
		int arrayLength = cubeArray.length;
		int redCount = 0, blueCount = 0;
		for (String cube : cubeArray) {
			if (cube.equals("1")) {
				blueCount++;
			} else {
				redCount++;
			}
		}
		int remainderCubes = Math.abs(blueCount - redCount);
		System.out.println(arrayLength - remainderCubes);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String cubes = sc.nextLine();

		String cubeArray[] = cubes.split("");
		int arrayLength = cubeArray.length;
		int redCount = 0, blueCount = 0;
		for (String cube : cubeArray) {
			if (cube.equals("1")) {
				blueCount++;
			} else {
				redCount++;
			}
		}
		int remainderCubes = Math.abs(blueCount - redCount);
		System.out.println(arrayLength - remainderCubes);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String cubes = sc.nextLine(); cubes sc.nextLine() sc.nextLine sc String cubeArray[] = cubes.split(""); cubeArray cubes.split("") cubes.split cubes "" int arrayLength = cubeArray.length; arrayLength cubeArray.length cubeArray cubeArray.length int redCount = 0 redCount 0 blueCount = 0; blueCount 0 for (String cube : cubeArray) {
			if (cube.equals("1")) {
				blueCount++;
			} else {
				redCount++;
			}
		} String cube cubeArray {
			if (cube.equals("1")) {
				blueCount++;
			} else {
				redCount++;
			}
		} {
			if (cube.equals("1")) {
				blueCount++;
			} else {
				redCount++;
			}
		} if (cube.equals("1")) {
				blueCount++;
			} else {
				redCount++;
			} cube.equals("1") cube.equals cube "1" {
				blueCount++;
			} blueCount++ blueCount {
				redCount++;
			} redCount++ redCount int remainderCubes = Math.abs(blueCount - redCount); remainderCubes Math.abs(blueCount - redCount) Math.abs Math blueCount - redCount blueCount redCount System.out.println(arrayLength - remainderCubes) System.out.println System.out System System.out arrayLength - remainderCubes arrayLength remainderCubes String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String cubes = sc.nextLine();

		String cubeArray[] = cubes.split("");
		int arrayLength = cubeArray.length;
		int redCount = 0, blueCount = 0;
		for (String cube : cubeArray) {
			if (cube.equals("1")) {
				blueCount++;
			} else {
				redCount++;
			}
		}
		int remainderCubes = Math.abs(blueCount - redCount);
		System.out.println(arrayLength - remainderCubes);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String cubes = sc.nextLine();

		String cubeArray[] = cubes.split("");
		int arrayLength = cubeArray.length;
		int redCount = 0, blueCount = 0;
		for (String cube : cubeArray) {
			if (cube.equals("1")) {
				blueCount++;
			} else {
				redCount++;
			}
		}
		int remainderCubes = Math.abs(blueCount - redCount);
		System.out.println(arrayLength - remainderCubes);
	}

} Main


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String cubes = sc.nextLine();

		String cubeArray[] = cubes.split("");
		int arrayLength = cubeArray.length;
		int redCount = 0, blueCount = 0;
		for (String cube : cubeArray) {
			if (cube.equals("1")) {
				blueCount++;
			} else {
				redCount++;
			}
		}
		int remainderCubes = Math.abs(blueCount - redCount);
		System.out.println(arrayLength - remainderCubes);
	}

}
