import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String tmp1 = s;
		String tmp2 = s;
		int red = tmp1.replace("1", "").length();
		int blue = tmp2.replace("0", "").length();
		System.out.println(Math.min(red, blue) * 2);
	}
} 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();
		sc.close();
		String tmp1 = s;
		String tmp2 = s;
		int red = tmp1.replace("1", "").length();
		int blue = tmp2.replace("0", "").length();
		System.out.println(Math.min(red, blue) * 2);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String tmp1 = s;
		String tmp2 = s;
		int red = tmp1.replace("1", "").length();
		int blue = tmp2.replace("0", "").length();
		System.out.println(Math.min(red, blue) * 2);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String tmp1 = s;
		String tmp2 = s;
		int red = tmp1.replace("1", "").length();
		int blue = tmp2.replace("0", "").length();
		System.out.println(Math.min(red, blue) * 2);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc String tmp1 = s; tmp1 s String tmp2 = s; tmp2 s int red = tmp1.replace("1", "").length(); red tmp1.replace("1", "").length() tmp1.replace("1", "").length tmp1.replace("1", "") tmp1.replace tmp1 "1" "" int blue = tmp2.replace("0", "").length(); blue tmp2.replace("0", "").length() tmp2.replace("0", "").length tmp2.replace("0", "") tmp2.replace tmp2 "0" "" System.out.println(Math.min(red, blue) * 2) System.out.println System.out System System.out Math.min(red, blue) * 2 Math.min(red, blue) Math.min Math red blue 2 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String tmp1 = s;
		String tmp2 = s;
		int red = tmp1.replace("1", "").length();
		int blue = tmp2.replace("0", "").length();
		System.out.println(Math.min(red, blue) * 2);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String tmp1 = s;
		String tmp2 = s;
		int red = tmp1.replace("1", "").length();
		int blue = tmp2.replace("0", "").length();
		System.out.println(Math.min(red, blue) * 2);
	}
} Main
import java.util.Scanner;

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