import java.util.Scanner;

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

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