import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		int red = 0;
		int blue = 0;
		while (input.length() != 1) {
			if (input.charAt(0) == '0') {
				red++;
			} else {
				blue++;
			}
			input = input.substring(1);
		}
		if (input.charAt(0) == '0') {
			red++;
		} else {
			blue++;
		}
		int ans = 0;
		if (red > blue) {
			ans = blue * 2;
		} else {
			ans = red * 2;
		}
		System.out.println(ans);
		
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		int red = 0;
		int blue = 0;
		while (input.length() != 1) {
			if (input.charAt(0) == '0') {
				red++;
			} else {
				blue++;
			}
			input = input.substring(1);
		}
		if (input.charAt(0) == '0') {
			red++;
		} else {
			blue++;
		}
		int ans = 0;
		if (red > blue) {
			ans = blue * 2;
		} else {
			ans = red * 2;
		}
		System.out.println(ans);
		
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		int red = 0;
		int blue = 0;
		while (input.length() != 1) {
			if (input.charAt(0) == '0') {
				red++;
			} else {
				blue++;
			}
			input = input.substring(1);
		}
		if (input.charAt(0) == '0') {
			red++;
		} else {
			blue++;
		}
		int ans = 0;
		if (red > blue) {
			ans = blue * 2;
		} else {
			ans = red * 2;
		}
		System.out.println(ans);
		
	} main {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		int red = 0;
		int blue = 0;
		while (input.length() != 1) {
			if (input.charAt(0) == '0') {
				red++;
			} else {
				blue++;
			}
			input = input.substring(1);
		}
		if (input.charAt(0) == '0') {
			red++;
		} else {
			blue++;
		}
		int ans = 0;
		if (red > blue) {
			ans = blue * 2;
		} else {
			ans = red * 2;
		}
		System.out.println(ans);
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.next(); input sc.next() sc.next sc int red = 0; red 0 int blue = 0; blue 0 while (input.length() != 1) {
			if (input.charAt(0) == '0') {
				red++;
			} else {
				blue++;
			}
			input = input.substring(1);
		} input.length() != 1 input.length() input.length input 1 {
			if (input.charAt(0) == '0') {
				red++;
			} else {
				blue++;
			}
			input = input.substring(1);
		} if (input.charAt(0) == '0') {
				red++;
			} else {
				blue++;
			} input.charAt(0) == '0' input.charAt(0) input.charAt input 0 '0' {
				red++;
			} red++ red {
				blue++;
			} blue++ blue input = input.substring(1) input input.substring(1) input.substring input 1 if (input.charAt(0) == '0') {
			red++;
		} else {
			blue++;
		} input.charAt(0) == '0' input.charAt(0) input.charAt input 0 '0' {
			red++;
		} red++ red {
			blue++;
		} blue++ blue int ans = 0; ans 0 if (red > blue) {
			ans = blue * 2;
		} else {
			ans = red * 2;
		} red > blue red blue {
			ans = blue * 2;
		} ans = blue * 2 ans blue * 2 blue 2 {
			ans = red * 2;
		} ans = red * 2 ans red * 2 red 2 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		int red = 0;
		int blue = 0;
		while (input.length() != 1) {
			if (input.charAt(0) == '0') {
				red++;
			} else {
				blue++;
			}
			input = input.substring(1);
		}
		if (input.charAt(0) == '0') {
			red++;
		} else {
			blue++;
		}
		int ans = 0;
		if (red > blue) {
			ans = blue * 2;
		} else {
			ans = red * 2;
		}
		System.out.println(ans);
		
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		int red = 0;
		int blue = 0;
		while (input.length() != 1) {
			if (input.charAt(0) == '0') {
				red++;
			} else {
				blue++;
			}
			input = input.substring(1);
		}
		if (input.charAt(0) == '0') {
			red++;
		} else {
			blue++;
		}
		int ans = 0;
		if (red > blue) {
			ans = blue * 2;
		} else {
			ans = red * 2;
		}
		System.out.println(ans);
		
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		int red = 0;
		int blue = 0;
		while (input.length() != 1) {
			if (input.charAt(0) == '0') {
				red++;
			} else {
				blue++;
			}
			input = input.substring(1);
		}
		if (input.charAt(0) == '0') {
			red++;
		} else {
			blue++;
		}
		int ans = 0;
		if (red > blue) {
			ans = blue * 2;
		} else {
			ans = red * 2;
		}
		System.out.println(ans);
		
	}

}
