import java.util.*;

public class Main{
	public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		String S = s.next();
		int n = 0, m = 0;
		for (int i = 0; i < S.length(); i++){
			if (S.substring(i, i + 1).equals("1")) n++;
			else m++;
		}
		System.out.println(2 * Math.min(n, m));
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		String S = s.next();
		int n = 0, m = 0;
		for (int i = 0; i < S.length(); i++){
			if (S.substring(i, i + 1).equals("1")) n++;
			else m++;
		}
		System.out.println(2 * Math.min(n, m));
	}
} Main public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		String S = s.next();
		int n = 0, m = 0;
		for (int i = 0; i < S.length(); i++){
			if (S.substring(i, i + 1).equals("1")) n++;
			else m++;
		}
		System.out.println(2 * Math.min(n, m));
	} main {
		Scanner s = new Scanner(System.in);
		String S = s.next();
		int n = 0, m = 0;
		for (int i = 0; i < S.length(); i++){
			if (S.substring(i, i + 1).equals("1")) n++;
			else m++;
		}
		System.out.println(2 * Math.min(n, m));
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) String S = s.next(); S s.next() s.next s int n = 0 n 0 m = 0; m 0 for (int i = 0; i < S.length(); i++){
			if (S.substring(i, i + 1).equals("1")) n++;
			else m++;
		} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
			if (S.substring(i, i + 1).equals("1")) n++;
			else m++;
		} {
			if (S.substring(i, i + 1).equals("1")) n++;
			else m++;
		} if (S.substring(i, i + 1).equals("1")) n++;
			else m++; S.substring(i, i + 1).equals("1") S.substring(i, i + 1).equals S.substring(i, i + 1) S.substring S i i + 1 i 1 "1" n++ n m++ m System.out.println(2 * Math.min(n, m)) System.out.println System.out System System.out 2 * Math.min(n, m) 2 Math.min(n, m) Math.min Math n m String[] args args public class Main{
	public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		String S = s.next();
		int n = 0, m = 0;
		for (int i = 0; i < S.length(); i++){
			if (S.substring(i, i + 1).equals("1")) n++;
			else m++;
		}
		System.out.println(2 * Math.min(n, m));
	}
} public class Main{
	public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		String S = s.next();
		int n = 0, m = 0;
		for (int i = 0; i < S.length(); i++){
			if (S.substring(i, i + 1).equals("1")) n++;
			else m++;
		}
		System.out.println(2 * Math.min(n, m));
	}
} Main
import java.util.*;

public class Main{
	public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		String S = s.next();
		int n = 0, m = 0;
		for (int i = 0; i < S.length(); i++){
			if (S.substring(i, i + 1).equals("1")) n++;
			else m++;
		}
		System.out.println(2 * Math.min(n, m));
	}
}
