import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		int ans = 0;
		for(int i = 0;i<S.length();i++){
			if(S.charAt(i) == '1'){
				ans += 1;
			}else{
				ans -= 1;
			}
		}
		System.out.println(S.length() - Math.abs(ans));
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		int ans = 0;
		for(int i = 0;i<S.length();i++){
			if(S.charAt(i) == '1'){
				ans += 1;
			}else{
				ans -= 1;
			}
		}
		System.out.println(S.length() - Math.abs(ans));
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		int ans = 0;
		for(int i = 0;i<S.length();i++){
			if(S.charAt(i) == '1'){
				ans += 1;
			}else{
				ans -= 1;
			}
		}
		System.out.println(S.length() - Math.abs(ans));
	} main {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		int ans = 0;
		for(int i = 0;i<S.length();i++){
			if(S.charAt(i) == '1'){
				ans += 1;
			}else{
				ans -= 1;
			}
		}
		System.out.println(S.length() - Math.abs(ans));
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String S = scan.next(); S scan.next() scan.next scan int ans = 0; ans 0 for(int i = 0;i<S.length();i++){
			if(S.charAt(i) == '1'){
				ans += 1;
			}else{
				ans -= 1;
			}
		} int i = 0; int i = 0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
			if(S.charAt(i) == '1'){
				ans += 1;
			}else{
				ans -= 1;
			}
		} {
			if(S.charAt(i) == '1'){
				ans += 1;
			}else{
				ans -= 1;
			}
		} if(S.charAt(i) == '1'){
				ans += 1;
			}else{
				ans -= 1;
			} S.charAt(i) == '1' S.charAt(i) S.charAt S i '1' {
				ans += 1;
			} ans += 1 ans 1 {
				ans -= 1;
			} ans -= 1 ans 1 System.out.println(S.length() - Math.abs(ans)) System.out.println System.out System System.out S.length() - Math.abs(ans) S.length() S.length S Math.abs(ans) Math.abs Math ans String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		int ans = 0;
		for(int i = 0;i<S.length();i++){
			if(S.charAt(i) == '1'){
				ans += 1;
			}else{
				ans -= 1;
			}
		}
		System.out.println(S.length() - Math.abs(ans));
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		int ans = 0;
		for(int i = 0;i<S.length();i++){
			if(S.charAt(i) == '1'){
				ans += 1;
			}else{
				ans -= 1;
			}
		}
		System.out.println(S.length() - Math.abs(ans));
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		int ans = 0;
		for(int i = 0;i<S.length();i++){
			if(S.charAt(i) == '1'){
				ans += 1;
			}else{
				ans -= 1;
			}
		}
		System.out.println(S.length() - Math.abs(ans));
	}
}
