import java.util.Scanner;

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

		String _0 = s.replaceAll("1", "");
		String _1 = s.replaceAll("0", "");
		
		int ans = Math.min(_0.length(), _1.length()) * 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 _0 = s.replaceAll("1", "");
		String _1 = s.replaceAll("0", "");
		
		int ans = Math.min(_0.length(), _1.length()) * 2;
		System.out.println(ans);
		
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();

		String _0 = s.replaceAll("1", "");
		String _1 = s.replaceAll("0", "");
		
		int ans = Math.min(_0.length(), _1.length()) * 2;
		System.out.println(ans);
		
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();

		String _0 = s.replaceAll("1", "");
		String _1 = s.replaceAll("0", "");
		
		int ans = Math.min(_0.length(), _1.length()) * 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 _0 = s.replaceAll("1", ""); _0 s.replaceAll("1", "") s.replaceAll s "1" "" String _1 = s.replaceAll("0", ""); _1 s.replaceAll("0", "") s.replaceAll s "0" "" int ans = Math.min(_0.length(), _1.length()) * 2; ans Math.min(_0.length(), _1.length()) * 2 Math.min(_0.length(), _1.length()) Math.min Math _0.length() _0.length _0 _1.length() _1.length _1 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 _0 = s.replaceAll("1", "");
		String _1 = s.replaceAll("0", "");
		
		int ans = Math.min(_0.length(), _1.length()) * 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 _0 = s.replaceAll("1", "");
		String _1 = s.replaceAll("0", "");
		
		int ans = Math.min(_0.length(), _1.length()) * 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 _0 = s.replaceAll("1", "");
		String _1 = s.replaceAll("0", "");
		
		int ans = Math.min(_0.length(), _1.length()) * 2;
		System.out.println(ans);
		
	}
}
