import java.util.*;
public class Main {
   public static void main(String[] args) {  
      Scanner sc = new Scanner(System.in);
      
      String s = sc.nextLine();
      int zero = 0;
      int one = 0;
      for(int i = 0; i < s.length(); i++) {
         if(s.charAt(i) == '0')
            zero++;
         else
            one++;
      }
      System.out.println(2*Math.min(zero, one));
   }
} import java.util.*; util.* java public class Main {
   public static void main(String[] args) {  
      Scanner sc = new Scanner(System.in);
      
      String s = sc.nextLine();
      int zero = 0;
      int one = 0;
      for(int i = 0; i < s.length(); i++) {
         if(s.charAt(i) == '0')
            zero++;
         else
            one++;
      }
      System.out.println(2*Math.min(zero, one));
   }
} Main public static void main(String[] args) {  
      Scanner sc = new Scanner(System.in);
      
      String s = sc.nextLine();
      int zero = 0;
      int one = 0;
      for(int i = 0; i < s.length(); i++) {
         if(s.charAt(i) == '0')
            zero++;
         else
            one++;
      }
      System.out.println(2*Math.min(zero, one));
   } main {  
      Scanner sc = new Scanner(System.in);
      
      String s = sc.nextLine();
      int zero = 0;
      int one = 0;
      for(int i = 0; i < s.length(); i++) {
         if(s.charAt(i) == '0')
            zero++;
         else
            one++;
      }
      System.out.println(2*Math.min(zero, one));
   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc int zero = 0; zero 0 int one = 0; one 0 for(int i = 0; i < s.length(); i++) {
         if(s.charAt(i) == '0')
            zero++;
         else
            one++;
      } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
         if(s.charAt(i) == '0')
            zero++;
         else
            one++;
      } {
         if(s.charAt(i) == '0')
            zero++;
         else
            one++;
      } if(s.charAt(i) == '0')
            zero++;
         else
            one++; s.charAt(i) == '0' s.charAt(i) s.charAt s i '0' zero++ zero one++ one System.out.println(2*Math.min(zero, one)) System.out.println System.out System System.out 2*Math.min(zero, one) 2 Math.min(zero, one) Math.min Math zero one String[] args args public class Main {
   public static void main(String[] args) {  
      Scanner sc = new Scanner(System.in);
      
      String s = sc.nextLine();
      int zero = 0;
      int one = 0;
      for(int i = 0; i < s.length(); i++) {
         if(s.charAt(i) == '0')
            zero++;
         else
            one++;
      }
      System.out.println(2*Math.min(zero, one));
   }
} public class Main {
   public static void main(String[] args) {  
      Scanner sc = new Scanner(System.in);
      
      String s = sc.nextLine();
      int zero = 0;
      int one = 0;
      for(int i = 0; i < s.length(); i++) {
         if(s.charAt(i) == '0')
            zero++;
         else
            one++;
      }
      System.out.println(2*Math.min(zero, one));
   }
} Main
import java.util.*;
public class Main {
   public static void main(String[] args) {  
      Scanner sc = new Scanner(System.in);
      
      String s = sc.nextLine();
      int zero = 0;
      int one = 0;
      for(int i = 0; i < s.length(); i++) {
         if(s.charAt(i) == '0')
            zero++;
         else
            one++;
      }
      System.out.println(2*Math.min(zero, one));
   }
}