import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int cnt0 = 0;
    int cnt1 = 0;

    for(int i=0; i<s.length(); i++){
      if( s.charAt(i) == '0')
        ++cnt0;
      else
        ++cnt1;
    }
    int cntMin = Math.min(cnt0, cnt1);
    if(cntMin == 0)
      System.out.println(0);
    else
      System.out.println(cntMin*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 cnt0 = 0;
    int cnt1 = 0;

    for(int i=0; i<s.length(); i++){
      if( s.charAt(i) == '0')
        ++cnt0;
      else
        ++cnt1;
    }
    int cntMin = Math.min(cnt0, cnt1);
    if(cntMin == 0)
      System.out.println(0);
    else
      System.out.println(cntMin*2);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int cnt0 = 0;
    int cnt1 = 0;

    for(int i=0; i<s.length(); i++){
      if( s.charAt(i) == '0')
        ++cnt0;
      else
        ++cnt1;
    }
    int cntMin = Math.min(cnt0, cnt1);
    if(cntMin == 0)
      System.out.println(0);
    else
      System.out.println(cntMin*2);
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int cnt0 = 0;
    int cnt1 = 0;

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

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

    for(int i=0; i<s.length(); i++){
      if( s.charAt(i) == '0')
        ++cnt0;
      else
        ++cnt1;
    }
    int cntMin = Math.min(cnt0, cnt1);
    if(cntMin == 0)
      System.out.println(0);
    else
      System.out.println(cntMin*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 cnt0 = 0;
    int cnt1 = 0;

    for(int i=0; i<s.length(); i++){
      if( s.charAt(i) == '0')
        ++cnt0;
      else
        ++cnt1;
    }
    int cntMin = Math.min(cnt0, cnt1);
    if(cntMin == 0)
      System.out.println(0);
    else
      System.out.println(cntMin*2);
  }
}