import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc=new Scanner(System.in);

		String S=sc.next();

		String[] str=S.split("");

		int N=str.length;
		int c0=0;
		int c1=0;

		for(int i=0;i<N;i++) {

			if(str[i].equals("0")) c0++;
			if(str[i].equals("1")) c1++;


		}

		System.out.println(Math.min(c0, c1)*2);

		sc.close();
	}

} 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();

		String[] str=S.split("");

		int N=str.length;
		int c0=0;
		int c1=0;

		for(int i=0;i<N;i++) {

			if(str[i].equals("0")) c0++;
			if(str[i].equals("1")) c1++;


		}

		System.out.println(Math.min(c0, c1)*2);

		sc.close();
	}

} Main public static void main(String[] args) {

		Scanner sc=new Scanner(System.in);

		String S=sc.next();

		String[] str=S.split("");

		int N=str.length;
		int c0=0;
		int c1=0;

		for(int i=0;i<N;i++) {

			if(str[i].equals("0")) c0++;
			if(str[i].equals("1")) c1++;


		}

		System.out.println(Math.min(c0, c1)*2);

		sc.close();
	} main {

		Scanner sc=new Scanner(System.in);

		String S=sc.next();

		String[] str=S.split("");

		int N=str.length;
		int c0=0;
		int c1=0;

		for(int i=0;i<N;i++) {

			if(str[i].equals("0")) c0++;
			if(str[i].equals("1")) c1++;


		}

		System.out.println(Math.min(c0, c1)*2);

		sc.close();
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String S=sc.next(); S sc.next() sc.next sc String[] str=S.split(""); str S.split("") S.split S "" int N=str.length; N str.length str str.length int c0=0; c0 0 int c1=0; c1 0 for(int i=0;i<N;i++) {

			if(str[i].equals("0")) c0++;
			if(str[i].equals("1")) c1++;


		} int i=0; int i=0; i 0 i<N i N i++ i++ i {

			if(str[i].equals("0")) c0++;
			if(str[i].equals("1")) c1++;


		} {

			if(str[i].equals("0")) c0++;
			if(str[i].equals("1")) c1++;


		} if(str[i].equals("0")) c0++; str[i].equals("0") str[i].equals str[i] str i "0" c0++ c0 if(str[i].equals("1")) c1++; str[i].equals("1") str[i].equals str[i] str i "1" c1++ c1 System.out.println(Math.min(c0, c1)*2) System.out.println System.out System System.out Math.min(c0, c1)*2 Math.min(c0, c1) Math.min Math c0 c1 2 sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc=new Scanner(System.in);

		String S=sc.next();

		String[] str=S.split("");

		int N=str.length;
		int c0=0;
		int c1=0;

		for(int i=0;i<N;i++) {

			if(str[i].equals("0")) c0++;
			if(str[i].equals("1")) c1++;


		}

		System.out.println(Math.min(c0, c1)*2);

		sc.close();
	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc=new Scanner(System.in);

		String S=sc.next();

		String[] str=S.split("");

		int N=str.length;
		int c0=0;
		int c1=0;

		for(int i=0;i<N;i++) {

			if(str[i].equals("0")) c0++;
			if(str[i].equals("1")) c1++;


		}

		System.out.println(Math.min(c0, c1)*2);

		sc.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc=new Scanner(System.in);

		String S=sc.next();

		String[] str=S.split("");

		int N=str.length;
		int c0=0;
		int c1=0;

		for(int i=0;i<N;i++) {

			if(str[i].equals("0")) c0++;
			if(str[i].equals("1")) c1++;


		}

		System.out.println(Math.min(c0, c1)*2);

		sc.close();
	}

}
