import java.util.Scanner;

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

		int[] cnt = new int[2];
		for (int i = 0; i < s.length; i++) {
			cnt[s[i] - '0']++;
		}
		System.out.println(Math.min(cnt[0], cnt[1]) * 2);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		sc.close();

		int[] cnt = new int[2];
		for (int i = 0; i < s.length; i++) {
			cnt[s[i] - '0']++;
		}
		System.out.println(Math.min(cnt[0], cnt[1]) * 2);
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		sc.close();

		int[] cnt = new int[2];
		for (int i = 0; i < s.length; i++) {
			cnt[s[i] - '0']++;
		}
		System.out.println(Math.min(cnt[0], cnt[1]) * 2);
	} main {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		sc.close();

		int[] cnt = new int[2];
		for (int i = 0; i < s.length; i++) {
			cnt[s[i] - '0']++;
		}
		System.out.println(Math.min(cnt[0], cnt[1]) * 2);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc sc.close() sc.close sc int[] cnt = new int[2]; cnt new int[2] 2 for (int i = 0; i < s.length; i++) {
			cnt[s[i] - '0']++;
		} int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
			cnt[s[i] - '0']++;
		} {
			cnt[s[i] - '0']++;
		} cnt[s[i] - '0']++ cnt[s[i] - '0'] cnt s[i] - '0' s[i] s i '0' System.out.println(Math.min(cnt[0], cnt[1]) * 2) System.out.println System.out System System.out Math.min(cnt[0], cnt[1]) * 2 Math.min(cnt[0], cnt[1]) Math.min Math cnt[0] cnt 0 cnt[1] cnt 1 2 String[] args args public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		sc.close();

		int[] cnt = new int[2];
		for (int i = 0; i < s.length; i++) {
			cnt[s[i] - '0']++;
		}
		System.out.println(Math.min(cnt[0], cnt[1]) * 2);
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		sc.close();

		int[] cnt = new int[2];
		for (int i = 0; i < s.length; i++) {
			cnt[s[i] - '0']++;
		}
		System.out.println(Math.min(cnt[0], cnt[1]) * 2);
	}
} Main
import java.util.Scanner;

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

		int[] cnt = new int[2];
		for (int i = 0; i < s.length; i++) {
			cnt[s[i] - '0']++;
		}
		System.out.println(Math.min(cnt[0], cnt[1]) * 2);
	}
}
