import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		String s = scn.next();
      	String[] list = s.split("");
      	int count0 = 0;
      	int count1 = 0;
      	for(int i=0; i<s.length(); i++){
          if(list[i].equals("0")) count0++;
          if(list[i].equals("1")) count1++;
        }
      	if(count0>=count1) System.out.println(count1*2);
      	if(count0<count1) System.out.println(count0*2);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		String s = scn.next();
      	String[] list = s.split("");
      	int count0 = 0;
      	int count1 = 0;
      	for(int i=0; i<s.length(); i++){
          if(list[i].equals("0")) count0++;
          if(list[i].equals("1")) count1++;
        }
      	if(count0>=count1) System.out.println(count1*2);
      	if(count0<count1) System.out.println(count0*2);
	}
} Main public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		String s = scn.next();
      	String[] list = s.split("");
      	int count0 = 0;
      	int count1 = 0;
      	for(int i=0; i<s.length(); i++){
          if(list[i].equals("0")) count0++;
          if(list[i].equals("1")) count1++;
        }
      	if(count0>=count1) System.out.println(count1*2);
      	if(count0<count1) System.out.println(count0*2);
	} main {
		Scanner scn = new Scanner(System.in);
		String s = scn.next();
      	String[] list = s.split("");
      	int count0 = 0;
      	int count1 = 0;
      	for(int i=0; i<s.length(); i++){
          if(list[i].equals("0")) count0++;
          if(list[i].equals("1")) count1++;
        }
      	if(count0>=count1) System.out.println(count1*2);
      	if(count0<count1) System.out.println(count0*2);
	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) String s = scn.next(); s scn.next() scn.next scn String[] list = s.split(""); list s.split("") s.split s "" int count0 = 0; count0 0 int count1 = 0; count1 0 for(int i=0; i<s.length(); i++){
          if(list[i].equals("0")) count0++;
          if(list[i].equals("1")) count1++;
        } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
          if(list[i].equals("0")) count0++;
          if(list[i].equals("1")) count1++;
        } {
          if(list[i].equals("0")) count0++;
          if(list[i].equals("1")) count1++;
        } if(list[i].equals("0")) count0++; list[i].equals("0") list[i].equals list[i] list i "0" count0++ count0 if(list[i].equals("1")) count1++; list[i].equals("1") list[i].equals list[i] list i "1" count1++ count1 if(count0>=count1) System.out.println(count1*2); count0>=count1 count0 count1 System.out.println(count1*2) System.out.println System.out System System.out count1*2 count1 2 if(count0<count1) System.out.println(count0*2); count0<count1 count0 count1 System.out.println(count0*2) System.out.println System.out System System.out count0*2 count0 2 String[] args args public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		String s = scn.next();
      	String[] list = s.split("");
      	int count0 = 0;
      	int count1 = 0;
      	for(int i=0; i<s.length(); i++){
          if(list[i].equals("0")) count0++;
          if(list[i].equals("1")) count1++;
        }
      	if(count0>=count1) System.out.println(count1*2);
      	if(count0<count1) System.out.println(count0*2);
	}
} public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		String s = scn.next();
      	String[] list = s.split("");
      	int count0 = 0;
      	int count1 = 0;
      	for(int i=0; i<s.length(); i++){
          if(list[i].equals("0")) count0++;
          if(list[i].equals("1")) count1++;
        }
      	if(count0>=count1) System.out.println(count1*2);
      	if(count0<count1) System.out.println(count0*2);
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		String s = scn.next();
      	String[] list = s.split("");
      	int count0 = 0;
      	int count1 = 0;
      	for(int i=0; i<s.length(); i++){
          if(list[i].equals("0")) count0++;
          if(list[i].equals("1")) count1++;
        }
      	if(count0>=count1) System.out.println(count1*2);
      	if(count0<count1) System.out.println(count0*2);
	}
}
