import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);

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

	public static void main(String[] args) {
		String S=sc.next();
		int O=0,I=0;
		for(int i=0;i<S.length();i++) {
			if(S.charAt(i)=='0') {
				O++;
			}else if(S.charAt(i)=='1') {
				I++;
			}
		}
		System.out.println(2*Math.min(O, I));
	}
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
		String S=sc.next();
		int O=0,I=0;
		for(int i=0;i<S.length();i++) {
			if(S.charAt(i)=='0') {
				O++;
			}else if(S.charAt(i)=='1') {
				I++;
			}
		}
		System.out.println(2*Math.min(O, I));
	} main {
		String S=sc.next();
		int O=0,I=0;
		for(int i=0;i<S.length();i++) {
			if(S.charAt(i)=='0') {
				O++;
			}else if(S.charAt(i)=='1') {
				I++;
			}
		}
		System.out.println(2*Math.min(O, I));
	} String S=sc.next(); S sc.next() sc.next sc int O=0 O 0 I=0; I 0 for(int i=0;i<S.length();i++) {
			if(S.charAt(i)=='0') {
				O++;
			}else if(S.charAt(i)=='1') {
				I++;
			}
		} 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') {
				O++;
			}else if(S.charAt(i)=='1') {
				I++;
			}
		} {
			if(S.charAt(i)=='0') {
				O++;
			}else if(S.charAt(i)=='1') {
				I++;
			}
		} if(S.charAt(i)=='0') {
				O++;
			}else if(S.charAt(i)=='1') {
				I++;
			} S.charAt(i)=='0' S.charAt(i) S.charAt S i '0' {
				O++;
			} O++ O if(S.charAt(i)=='1') {
				I++;
			} S.charAt(i)=='1' S.charAt(i) S.charAt S i '1' {
				I++;
			} I++ I System.out.println(2*Math.min(O, I)) System.out.println System.out System System.out 2*Math.min(O, I) 2 Math.min(O, I) Math.min Math O I String[] args args public class Main {
	static Scanner sc = new Scanner(System.in);

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

	public static void main(String[] args) {
		String S=sc.next();
		int O=0,I=0;
		for(int i=0;i<S.length();i++) {
			if(S.charAt(i)=='0') {
				O++;
			}else if(S.charAt(i)=='1') {
				I++;
			}
		}
		System.out.println(2*Math.min(O, I));
	}
} Main
import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		String S=sc.next();
		int O=0,I=0;
		for(int i=0;i<S.length();i++) {
			if(S.charAt(i)=='0') {
				O++;
			}else if(S.charAt(i)=='1') {
				I++;
			}
		}
		System.out.println(2*Math.min(O, I));
	}
}