import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		String s=stdIn.next();
		int z=0;
		int zero=0,one=0;
		while(z<s.length()){
			if(s.substring(z, z+1).equals("1"))
				one++;
			else
				zero++;
			z++;
		}
		if(one>=zero)
			System.out.println(zero*2);
		else
			System.out.println(one*2);
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		String s=stdIn.next();
		int z=0;
		int zero=0,one=0;
		while(z<s.length()){
			if(s.substring(z, z+1).equals("1"))
				one++;
			else
				zero++;
			z++;
		}
		if(one>=zero)
			System.out.println(zero*2);
		else
			System.out.println(one*2);
	}

} Main public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		String s=stdIn.next();
		int z=0;
		int zero=0,one=0;
		while(z<s.length()){
			if(s.substring(z, z+1).equals("1"))
				one++;
			else
				zero++;
			z++;
		}
		if(one>=zero)
			System.out.println(zero*2);
		else
			System.out.println(one*2);
	} main {
		Scanner stdIn=new Scanner(System.in);
		String s=stdIn.next();
		int z=0;
		int zero=0,one=0;
		while(z<s.length()){
			if(s.substring(z, z+1).equals("1"))
				one++;
			else
				zero++;
			z++;
		}
		if(one>=zero)
			System.out.println(zero*2);
		else
			System.out.println(one*2);
	} Scanner stdIn=new Scanner(System.in); stdIn new Scanner(System.in) String s=stdIn.next(); s stdIn.next() stdIn.next stdIn int z=0; z 0 int zero=0 zero 0 one=0; one 0 while(z<s.length()){
			if(s.substring(z, z+1).equals("1"))
				one++;
			else
				zero++;
			z++;
		} z<s.length() z s.length() s.length s {
			if(s.substring(z, z+1).equals("1"))
				one++;
			else
				zero++;
			z++;
		} if(s.substring(z, z+1).equals("1"))
				one++;
			else
				zero++; s.substring(z, z+1).equals("1") s.substring(z, z+1).equals s.substring(z, z+1) s.substring s z z+1 z 1 "1" one++ one zero++ zero z++ z if(one>=zero)
			System.out.println(zero*2);
		else
			System.out.println(one*2); one>=zero one zero System.out.println(zero*2) System.out.println System.out System System.out zero*2 zero 2 System.out.println(one*2) System.out.println System.out System System.out one*2 one 2 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		String s=stdIn.next();
		int z=0;
		int zero=0,one=0;
		while(z<s.length()){
			if(s.substring(z, z+1).equals("1"))
				one++;
			else
				zero++;
			z++;
		}
		if(one>=zero)
			System.out.println(zero*2);
		else
			System.out.println(one*2);
	}

} public class Main {
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		String s=stdIn.next();
		int z=0;
		int zero=0,one=0;
		while(z<s.length()){
			if(s.substring(z, z+1).equals("1"))
				one++;
			else
				zero++;
			z++;
		}
		if(one>=zero)
			System.out.println(zero*2);
		else
			System.out.println(one*2);
	}

} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		String s=stdIn.next();
		int z=0;
		int zero=0,one=0;
		while(z<s.length()){
			if(s.substring(z, z+1).equals("1"))
				one++;
			else
				zero++;
			z++;
		}
		if(one>=zero)
			System.out.println(zero*2);
		else
			System.out.println(one*2);
	}

}