import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc =new Scanner(System.in);
    String S =sc.next();
    String s[] =S.split("",0);
    int N =S.length();
    int t[] =new int[N];
    int x=0;int y=0;
    for(int i=0;i<N;i++){
      t[i]=Integer.parseInt(s[i]);
      if(t[i]==0){x=x+1;}
      else{y=y+1;}
    }
    int z =Math.min(x,y);
    System.out.println(z*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();
    String s[] =S.split("",0);
    int N =S.length();
    int t[] =new int[N];
    int x=0;int y=0;
    for(int i=0;i<N;i++){
      t[i]=Integer.parseInt(s[i]);
      if(t[i]==0){x=x+1;}
      else{y=y+1;}
    }
    int z =Math.min(x,y);
    System.out.println(z*2);
  }
} Main public static void main(String[] args){
    Scanner sc =new Scanner(System.in);
    String S =sc.next();
    String s[] =S.split("",0);
    int N =S.length();
    int t[] =new int[N];
    int x=0;int y=0;
    for(int i=0;i<N;i++){
      t[i]=Integer.parseInt(s[i]);
      if(t[i]==0){x=x+1;}
      else{y=y+1;}
    }
    int z =Math.min(x,y);
    System.out.println(z*2);
  } main {
    Scanner sc =new Scanner(System.in);
    String S =sc.next();
    String s[] =S.split("",0);
    int N =S.length();
    int t[] =new int[N];
    int x=0;int y=0;
    for(int i=0;i<N;i++){
      t[i]=Integer.parseInt(s[i]);
      if(t[i]==0){x=x+1;}
      else{y=y+1;}
    }
    int z =Math.min(x,y);
    System.out.println(z*2);
  } Scanner sc =new Scanner(System.in); sc new Scanner(System.in) String S =sc.next(); S sc.next() sc.next sc String s[] =S.split("",0); s S.split("",0) S.split S "" 0 int N =S.length(); N S.length() S.length S int t[] =new int[N]; t new int[N] N int x=0; x 0 int y=0; y 0 for(int i=0;i<N;i++){
      t[i]=Integer.parseInt(s[i]);
      if(t[i]==0){x=x+1;}
      else{y=y+1;}
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
      t[i]=Integer.parseInt(s[i]);
      if(t[i]==0){x=x+1;}
      else{y=y+1;}
    } {
      t[i]=Integer.parseInt(s[i]);
      if(t[i]==0){x=x+1;}
      else{y=y+1;}
    } t[i]=Integer.parseInt(s[i]) t[i] t i Integer.parseInt(s[i]) Integer.parseInt Integer s[i] s i if(t[i]==0){x=x+1;}
      else{y=y+1;} t[i]==0 t[i] t i 0 {x=x+1;} x=x+1 x x+1 x 1 {y=y+1;} y=y+1 y y+1 y 1 int z =Math.min(x,y); z Math.min(x,y) Math.min Math x y System.out.println(z*2) System.out.println System.out System System.out z*2 z 2 String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc =new Scanner(System.in);
    String S =sc.next();
    String s[] =S.split("",0);
    int N =S.length();
    int t[] =new int[N];
    int x=0;int y=0;
    for(int i=0;i<N;i++){
      t[i]=Integer.parseInt(s[i]);
      if(t[i]==0){x=x+1;}
      else{y=y+1;}
    }
    int z =Math.min(x,y);
    System.out.println(z*2);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc =new Scanner(System.in);
    String S =sc.next();
    String s[] =S.split("",0);
    int N =S.length();
    int t[] =new int[N];
    int x=0;int y=0;
    for(int i=0;i<N;i++){
      t[i]=Integer.parseInt(s[i]);
      if(t[i]==0){x=x+1;}
      else{y=y+1;}
    }
    int z =Math.min(x,y);
    System.out.println(z*2);
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc =new Scanner(System.in);
    String S =sc.next();
    String s[] =S.split("",0);
    int N =S.length();
    int t[] =new int[N];
    int x=0;int y=0;
    for(int i=0;i<N;i++){
      t[i]=Integer.parseInt(s[i]);
      if(t[i]==0){x=x+1;}
      else{y=y+1;}
    }
    int z =Math.min(x,y);
    System.out.println(z*2);
  }
}