import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String S1 = S.replace("0","");
		int n1 = S1.length();
		int n0 = S.length() - n1;
		int min = Math.min(n1,n0);
			System.out.println( 2 * min);

	}

} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String S1 = S.replace("0","");
		int n1 = S1.length();
		int n0 = S.length() - n1;
		int min = Math.min(n1,n0);
			System.out.println( 2 * min);

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String S1 = S.replace("0","");
		int n1 = S1.length();
		int n0 = S.length() - n1;
		int min = Math.min(n1,n0);
			System.out.println( 2 * min);

	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String S1 = S.replace("0","");
		int n1 = S1.length();
		int n0 = S.length() - n1;
		int min = Math.min(n1,n0);
			System.out.println( 2 * min);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc String S1 = S.replace("0",""); S1 S.replace("0","") S.replace S "0" "" int n1 = S1.length(); n1 S1.length() S1.length S1 int n0 = S.length() - n1; n0 S.length() - n1 S.length() S.length S n1 int min = Math.min(n1,n0); min Math.min(n1,n0) Math.min Math n1 n0 System.out.println( 2 * min) System.out.println System.out System System.out 2 * min 2 min String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String S1 = S.replace("0","");
		int n1 = S1.length();
		int n0 = S.length() - n1;
		int min = Math.min(n1,n0);
			System.out.println( 2 * min);

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String S1 = S.replace("0","");
		int n1 = S1.length();
		int n0 = S.length() - n1;
		int min = Math.min(n1,n0);
			System.out.println( 2 * min);

	}

} Main
import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String S1 = S.replace("0","");
		int n1 = S1.length();
		int n0 = S.length() - n1;
		int min = Math.min(n1,n0);
			System.out.println( 2 * min);

	}

}