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();

		int zero = 0;
		int one = 0;
		for(int i = 0;i < S.length();i++) {
			if(S.charAt(i)=='0') {
				zero++;
			}else {
				one++;
			}
		}
		System.out.println(2*Math.min(zero, one));
	}
} 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();

		int zero = 0;
		int one = 0;
		for(int i = 0;i < S.length();i++) {
			if(S.charAt(i)=='0') {
				zero++;
			}else {
				one++;
			}
		}
		System.out.println(2*Math.min(zero, one));
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S =sc.next();
		sc.close();

		int zero = 0;
		int one = 0;
		for(int i = 0;i < S.length();i++) {
			if(S.charAt(i)=='0') {
				zero++;
			}else {
				one++;
			}
		}
		System.out.println(2*Math.min(zero, one));
	} main {
		Scanner sc = new Scanner(System.in);
		String S =sc.next();
		sc.close();

		int zero = 0;
		int one = 0;
		for(int i = 0;i < S.length();i++) {
			if(S.charAt(i)=='0') {
				zero++;
			}else {
				one++;
			}
		}
		System.out.println(2*Math.min(zero, one));
	} 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 int zero = 0; zero 0 int one = 0; one 0 for(int i = 0;i < S.length();i++) {
			if(S.charAt(i)=='0') {
				zero++;
			}else {
				one++;
			}
		} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
			if(S.charAt(i)=='0') {
				zero++;
			}else {
				one++;
			}
		} {
			if(S.charAt(i)=='0') {
				zero++;
			}else {
				one++;
			}
		} if(S.charAt(i)=='0') {
				zero++;
			}else {
				one++;
			} S.charAt(i)=='0' S.charAt(i) S.charAt S i '0' {
				zero++;
			} zero++ zero {
				one++;
			} one++ one System.out.println(2*Math.min(zero, one)) System.out.println System.out System System.out 2*Math.min(zero, one) 2 Math.min(zero, one) Math.min Math zero one String[] args args public class Main {

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

		int zero = 0;
		int one = 0;
		for(int i = 0;i < S.length();i++) {
			if(S.charAt(i)=='0') {
				zero++;
			}else {
				one++;
			}
		}
		System.out.println(2*Math.min(zero, one));
	}
} public class Main {

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

		int zero = 0;
		int one = 0;
		for(int i = 0;i < S.length();i++) {
			if(S.charAt(i)=='0') {
				zero++;
			}else {
				one++;
			}
		}
		System.out.println(2*Math.min(zero, one));
	}
} 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();

		int zero = 0;
		int one = 0;
		for(int i = 0;i < S.length();i++) {
			if(S.charAt(i)=='0') {
				zero++;
			}else {
				one++;
			}
		}
		System.out.println(2*Math.min(zero, one));
	}
}