import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String[] a = s.split("");
		int zero = 0;
		for(int i = 0; i < a.length; i++) {
			if(a[i].equals("0")) {
				zero ++;
			}
		}
		int one = a.length - zero;
		int ans = Math.min(zero, one) * 2;
		System.out.println(ans);
	}
} 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();
		String[] a = s.split("");
		int zero = 0;
		for(int i = 0; i < a.length; i++) {
			if(a[i].equals("0")) {
				zero ++;
			}
		}
		int one = a.length - zero;
		int ans = Math.min(zero, one) * 2;
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String[] a = s.split("");
		int zero = 0;
		for(int i = 0; i < a.length; i++) {
			if(a[i].equals("0")) {
				zero ++;
			}
		}
		int one = a.length - zero;
		int ans = Math.min(zero, one) * 2;
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String[] a = s.split("");
		int zero = 0;
		for(int i = 0; i < a.length; i++) {
			if(a[i].equals("0")) {
				zero ++;
			}
		}
		int one = a.length - zero;
		int ans = Math.min(zero, one) * 2;
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String[] a = s.split(""); a s.split("") s.split s "" int zero = 0; zero 0 for(int i = 0; i < a.length; i++) {
			if(a[i].equals("0")) {
				zero ++;
			}
		} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
			if(a[i].equals("0")) {
				zero ++;
			}
		} {
			if(a[i].equals("0")) {
				zero ++;
			}
		} if(a[i].equals("0")) {
				zero ++;
			} a[i].equals("0") a[i].equals a[i] a i "0" {
				zero ++;
			} zero ++ zero int one = a.length - zero; one a.length - zero a.length a a.length zero int ans = Math.min(zero, one) * 2; ans Math.min(zero, one) * 2 Math.min(zero, one) Math.min Math zero one 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 s = sc.next();
		String[] a = s.split("");
		int zero = 0;
		for(int i = 0; i < a.length; i++) {
			if(a[i].equals("0")) {
				zero ++;
			}
		}
		int one = a.length - zero;
		int ans = Math.min(zero, one) * 2;
		System.out.println(ans);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String[] a = s.split("");
		int zero = 0;
		for(int i = 0; i < a.length; i++) {
			if(a[i].equals("0")) {
				zero ++;
			}
		}
		int one = a.length - zero;
		int ans = Math.min(zero, one) * 2;
		System.out.println(ans);
	}
} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String[] a = s.split("");
		int zero = 0;
		for(int i = 0; i < a.length; i++) {
			if(a[i].equals("0")) {
				zero ++;
			}
		}
		int one = a.length - zero;
		int ans = Math.min(zero, one) * 2;
		System.out.println(ans);
	}
}
