import java.util.Scanner;

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

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