import java.util.*;
 
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int red =0;
    int blue = 0;
    for(int i=0; i<S.length(); i++){
      if(S.substring(i, i+1).equals("0")){
        //System.out.println(S.substring(i, i+1));
        red++;
      }else{
        blue++;
      }
    }
    System.out.println(Math.min(red, blue)*2);
  }
}

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

    
    