import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    
    String s=sc.next();
    int r=0;
    int b=0;
    char k[]=new char[s.length()];
    for(int i=0;i<s.length();i++){
      k[i]=s.charAt(i);
    }
    for(int i=0;i<k.length;i++){
      if(k[i]=='0') r++;
      else b++;
    }
    if(r>=b) System.out.println(b*2);
    else System.out.println(r*2);

    sc.close();
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    
    String s=sc.next();
    int r=0;
    int b=0;
    char k[]=new char[s.length()];
    for(int i=0;i<s.length();i++){
      k[i]=s.charAt(i);
    }
    for(int i=0;i<k.length;i++){
      if(k[i]=='0') r++;
      else b++;
    }
    if(r>=b) System.out.println(b*2);
    else System.out.println(r*2);

    sc.close();
  }
} Main public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    
    String s=sc.next();
    int r=0;
    int b=0;
    char k[]=new char[s.length()];
    for(int i=0;i<s.length();i++){
      k[i]=s.charAt(i);
    }
    for(int i=0;i<k.length;i++){
      if(k[i]=='0') r++;
      else b++;
    }
    if(r>=b) System.out.println(b*2);
    else System.out.println(r*2);

    sc.close();
  } main {
    Scanner sc=new Scanner(System.in);
    
    String s=sc.next();
    int r=0;
    int b=0;
    char k[]=new char[s.length()];
    for(int i=0;i<s.length();i++){
      k[i]=s.charAt(i);
    }
    for(int i=0;i<k.length;i++){
      if(k[i]=='0') r++;
      else b++;
    }
    if(r>=b) System.out.println(b*2);
    else System.out.println(r*2);

    sc.close();
  } 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 int b=0; b 0 char k[]=new char[s.length()]; k new char[s.length()] s.length() s.length s for(int i=0;i<s.length();i++){
      k[i]=s.charAt(i);
    } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
      k[i]=s.charAt(i);
    } {
      k[i]=s.charAt(i);
    } k[i]=s.charAt(i) k[i] k i s.charAt(i) s.charAt s i for(int i=0;i<k.length;i++){
      if(k[i]=='0') r++;
      else b++;
    } int i=0; int i=0; i 0 i<k.length i k.length k k.length i++ i++ i {
      if(k[i]=='0') r++;
      else b++;
    } {
      if(k[i]=='0') r++;
      else b++;
    } if(k[i]=='0') r++;
      else b++; k[i]=='0' k[i] k i '0' r++ r b++ b if(r>=b) System.out.println(b*2);
    else System.out.println(r*2); r>=b r b System.out.println(b*2) System.out.println System.out System System.out b*2 b 2 System.out.println(r*2) System.out.println System.out System System.out r*2 r 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();
    int r=0;
    int b=0;
    char k[]=new char[s.length()];
    for(int i=0;i<s.length();i++){
      k[i]=s.charAt(i);
    }
    for(int i=0;i<k.length;i++){
      if(k[i]=='0') r++;
      else b++;
    }
    if(r>=b) System.out.println(b*2);
    else System.out.println(r*2);

    sc.close();
  }
} public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    
    String s=sc.next();
    int r=0;
    int b=0;
    char k[]=new char[s.length()];
    for(int i=0;i<s.length();i++){
      k[i]=s.charAt(i);
    }
    for(int i=0;i<k.length;i++){
      if(k[i]=='0') r++;
      else b++;
    }
    if(r>=b) System.out.println(b*2);
    else System.out.println(r*2);

    sc.close();
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    
    String s=sc.next();
    int r=0;
    int b=0;
    char k[]=new char[s.length()];
    for(int i=0;i<s.length();i++){
      k[i]=s.charAt(i);
    }
    for(int i=0;i<k.length;i++){
      if(k[i]=='0') r++;
      else b++;
    }
    if(r>=b) System.out.println(b*2);
    else System.out.println(r*2);

    sc.close();
  }
}