import java.util.Scanner;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int a[] = new int[2];
		for (int i=0;i<S.length();i++) {
			a[S.charAt(i)-'0']++;
		}
		if (a[0]>a[1]) {
			System.out.println(a[1]*2);
		} else {
			System.out.println(a[0]*2);
		}
	}
} 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();
		int a[] = new int[2];
		for (int i=0;i<S.length();i++) {
			a[S.charAt(i)-'0']++;
		}
		if (a[0]>a[1]) {
			System.out.println(a[1]*2);
		} else {
			System.out.println(a[0]*2);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int a[] = new int[2];
		for (int i=0;i<S.length();i++) {
			a[S.charAt(i)-'0']++;
		}
		if (a[0]>a[1]) {
			System.out.println(a[1]*2);
		} else {
			System.out.println(a[0]*2);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int a[] = new int[2];
		for (int i=0;i<S.length();i++) {
			a[S.charAt(i)-'0']++;
		}
		if (a[0]>a[1]) {
			System.out.println(a[1]*2);
		} else {
			System.out.println(a[0]*2);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int a[] = new int[2]; a new int[2] 2 for (int i=0;i<S.length();i++) {
			a[S.charAt(i)-'0']++;
		} int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
			a[S.charAt(i)-'0']++;
		} {
			a[S.charAt(i)-'0']++;
		} a[S.charAt(i)-'0']++ a[S.charAt(i)-'0'] a S.charAt(i)-'0' S.charAt(i) S.charAt S i '0' if (a[0]>a[1]) {
			System.out.println(a[1]*2);
		} else {
			System.out.println(a[0]*2);
		} a[0]>a[1] a[0] a 0 a[1] a 1 {
			System.out.println(a[1]*2);
		} System.out.println(a[1]*2) System.out.println System.out System System.out a[1]*2 a[1] a 1 2 {
			System.out.println(a[0]*2);
		} System.out.println(a[0]*2) System.out.println System.out System System.out a[0]*2 a[0] a 0 2 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int a[] = new int[2];
		for (int i=0;i<S.length();i++) {
			a[S.charAt(i)-'0']++;
		}
		if (a[0]>a[1]) {
			System.out.println(a[1]*2);
		} else {
			System.out.println(a[0]*2);
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int a[] = new int[2];
		for (int i=0;i<S.length();i++) {
			a[S.charAt(i)-'0']++;
		}
		if (a[0]>a[1]) {
			System.out.println(a[1]*2);
		} else {
			System.out.println(a[0]*2);
		}
	}
} Main
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int a[] = new int[2];
		for (int i=0;i<S.length();i++) {
			a[S.charAt(i)-'0']++;
		}
		if (a[0]>a[1]) {
			System.out.println(a[1]*2);
		} else {
			System.out.println(a[0]*2);
		}
	}
}