import java.util.Scanner;

public class Main{
  public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
	  String s=sc.next();
	  int r=0,b=0;
	  for(int i=0;i<s.length();i++) {
		  if(s.substring(i, i+1).equals("0"))r++;
		  else b++;
	  }
	  System.out.println(Math.min(r, b)*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 r=0,b=0;
	  for(int i=0;i<s.length();i++) {
		  if(s.substring(i, i+1).equals("0"))r++;
		  else b++;
	  }
	  System.out.println(Math.min(r, b)*2);
  }
} Main public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
	  String s=sc.next();
	  int r=0,b=0;
	  for(int i=0;i<s.length();i++) {
		  if(s.substring(i, i+1).equals("0"))r++;
		  else b++;
	  }
	  System.out.println(Math.min(r, b)*2);
  } main {
	  Scanner sc = new Scanner(System.in);
	  String s=sc.next();
	  int r=0,b=0;
	  for(int i=0;i<s.length();i++) {
		  if(s.substring(i, i+1).equals("0"))r++;
		  else b++;
	  }
	  System.out.println(Math.min(r, b)*2);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s=sc.next(); s sc.next() sc.next sc int r=0 r 0 b=0; b 0 for(int i=0;i<s.length();i++) {
		  if(s.substring(i, i+1).equals("0"))r++;
		  else b++;
	  } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
		  if(s.substring(i, i+1).equals("0"))r++;
		  else b++;
	  } {
		  if(s.substring(i, i+1).equals("0"))r++;
		  else b++;
	  } if(s.substring(i, i+1).equals("0"))r++;
		  else b++; s.substring(i, i+1).equals("0") s.substring(i, i+1).equals s.substring(i, i+1) s.substring s i i+1 i 1 "0" r++ r b++ b System.out.println(Math.min(r, b)*2) System.out.println System.out System System.out Math.min(r, b)*2 Math.min(r, b) Math.min Math r b 2 String[] args args public class Main{
  public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
	  String s=sc.next();
	  int r=0,b=0;
	  for(int i=0;i<s.length();i++) {
		  if(s.substring(i, i+1).equals("0"))r++;
		  else b++;
	  }
	  System.out.println(Math.min(r, b)*2);
  }
} public class Main{
  public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
	  String s=sc.next();
	  int r=0,b=0;
	  for(int i=0;i<s.length();i++) {
		  if(s.substring(i, i+1).equals("0"))r++;
		  else b++;
	  }
	  System.out.println(Math.min(r, b)*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 r=0,b=0;
	  for(int i=0;i<s.length();i++) {
		  if(s.substring(i, i+1).equals("0"))r++;
		  else b++;
	  }
	  System.out.println(Math.min(r, b)*2);
  }
}

