import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		int c0 = S.length() - S.replace("0", "").length();
		int c1 = S.length() - S.replace("1", "").length();

		System.out.println(2 * Math.min(c0, c1));

		sc.close();
	}
} 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();

		int c0 = S.length() - S.replace("0", "").length();
		int c1 = S.length() - S.replace("1", "").length();

		System.out.println(2 * Math.min(c0, c1));

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		int c0 = S.length() - S.replace("0", "").length();
		int c1 = S.length() - S.replace("1", "").length();

		System.out.println(2 * Math.min(c0, c1));

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		int c0 = S.length() - S.replace("0", "").length();
		int c1 = S.length() - S.replace("1", "").length();

		System.out.println(2 * Math.min(c0, c1));

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

		int c0 = S.length() - S.replace("0", "").length();
		int c1 = S.length() - S.replace("1", "").length();

		System.out.println(2 * Math.min(c0, c1));

		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		int c0 = S.length() - S.replace("0", "").length();
		int c1 = S.length() - S.replace("1", "").length();

		System.out.println(2 * Math.min(c0, c1));

		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		int c0 = S.length() - S.replace("0", "").length();
		int c1 = S.length() - S.replace("1", "").length();

		System.out.println(2 * Math.min(c0, c1));

		sc.close();
	}
}