import java.util.*;

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

		int zeroCnt = 0;
		int oneCnt = 0;

		for (int i = 0; i < C.length; i++) {
			if (C[i] == '0') {
				zeroCnt++;
			} else {
				oneCnt++;
			}
		}

		System.out.println(Math.min(zeroCnt, oneCnt) * 2);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] C = sc.next().toCharArray();
		sc.close();

		int zeroCnt = 0;
		int oneCnt = 0;

		for (int i = 0; i < C.length; i++) {
			if (C[i] == '0') {
				zeroCnt++;
			} else {
				oneCnt++;
			}
		}

		System.out.println(Math.min(zeroCnt, oneCnt) * 2);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] C = sc.next().toCharArray();
		sc.close();

		int zeroCnt = 0;
		int oneCnt = 0;

		for (int i = 0; i < C.length; i++) {
			if (C[i] == '0') {
				zeroCnt++;
			} else {
				oneCnt++;
			}
		}

		System.out.println(Math.min(zeroCnt, oneCnt) * 2);
	} main {
		Scanner sc = new Scanner(System.in);
		char[] C = sc.next().toCharArray();
		sc.close();

		int zeroCnt = 0;
		int oneCnt = 0;

		for (int i = 0; i < C.length; i++) {
			if (C[i] == '0') {
				zeroCnt++;
			} else {
				oneCnt++;
			}
		}

		System.out.println(Math.min(zeroCnt, oneCnt) * 2);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] C = sc.next().toCharArray(); C sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc sc.close() sc.close sc int zeroCnt = 0; zeroCnt 0 int oneCnt = 0; oneCnt 0 for (int i = 0; i < C.length; i++) {
			if (C[i] == '0') {
				zeroCnt++;
			} else {
				oneCnt++;
			}
		} int i = 0; int i = 0; i 0 i < C.length i C.length C C.length i++ i++ i {
			if (C[i] == '0') {
				zeroCnt++;
			} else {
				oneCnt++;
			}
		} {
			if (C[i] == '0') {
				zeroCnt++;
			} else {
				oneCnt++;
			}
		} if (C[i] == '0') {
				zeroCnt++;
			} else {
				oneCnt++;
			} C[i] == '0' C[i] C i '0' {
				zeroCnt++;
			} zeroCnt++ zeroCnt {
				oneCnt++;
			} oneCnt++ oneCnt System.out.println(Math.min(zeroCnt, oneCnt) * 2) System.out.println System.out System System.out Math.min(zeroCnt, oneCnt) * 2 Math.min(zeroCnt, oneCnt) Math.min Math zeroCnt oneCnt 2 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] C = sc.next().toCharArray();
		sc.close();

		int zeroCnt = 0;
		int oneCnt = 0;

		for (int i = 0; i < C.length; i++) {
			if (C[i] == '0') {
				zeroCnt++;
			} else {
				oneCnt++;
			}
		}

		System.out.println(Math.min(zeroCnt, oneCnt) * 2);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] C = sc.next().toCharArray();
		sc.close();

		int zeroCnt = 0;
		int oneCnt = 0;

		for (int i = 0; i < C.length; i++) {
			if (C[i] == '0') {
				zeroCnt++;
			} else {
				oneCnt++;
			}
		}

		System.out.println(Math.min(zeroCnt, oneCnt) * 2);
	}
} Main
import java.util.*;

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

		int zeroCnt = 0;
		int oneCnt = 0;

		for (int i = 0; i < C.length; i++) {
			if (C[i] == '0') {
				zeroCnt++;
			} else {
				oneCnt++;
			}
		}

		System.out.println(Math.min(zeroCnt, oneCnt) * 2);
	}
}
