import java.util.*;

public class Main {
  public static void main(String[] args) {
    String line = new Scanner(System.in).nextLine();
    int zeros = 0;
    int ones = 0;
    for (int ix = 0; ix < line.length(); ix++) {
      if (line.charAt(ix) == '0') {
          zeros++;
        } else if (line.charAt(ix) == '1') {
          ones++;
        }
    }
    
    System.out.println(2 * Math.min(zeros, ones));
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    String line = new Scanner(System.in).nextLine();
    int zeros = 0;
    int ones = 0;
    for (int ix = 0; ix < line.length(); ix++) {
      if (line.charAt(ix) == '0') {
          zeros++;
        } else if (line.charAt(ix) == '1') {
          ones++;
        }
    }
    
    System.out.println(2 * Math.min(zeros, ones));
  }
} Main public static void main(String[] args) {
    String line = new Scanner(System.in).nextLine();
    int zeros = 0;
    int ones = 0;
    for (int ix = 0; ix < line.length(); ix++) {
      if (line.charAt(ix) == '0') {
          zeros++;
        } else if (line.charAt(ix) == '1') {
          ones++;
        }
    }
    
    System.out.println(2 * Math.min(zeros, ones));
  } main {
    String line = new Scanner(System.in).nextLine();
    int zeros = 0;
    int ones = 0;
    for (int ix = 0; ix < line.length(); ix++) {
      if (line.charAt(ix) == '0') {
          zeros++;
        } else if (line.charAt(ix) == '1') {
          ones++;
        }
    }
    
    System.out.println(2 * Math.min(zeros, ones));
  } String line = new Scanner(System.in).nextLine(); line new Scanner(System.in).nextLine() new Scanner(System.in).nextLine new Scanner(System.in) int zeros = 0; zeros 0 int ones = 0; ones 0 for (int ix = 0; ix < line.length(); ix++) {
      if (line.charAt(ix) == '0') {
          zeros++;
        } else if (line.charAt(ix) == '1') {
          ones++;
        }
    } int ix = 0; int ix = 0; ix 0 ix < line.length() ix line.length() line.length line ix++ ix++ ix {
      if (line.charAt(ix) == '0') {
          zeros++;
        } else if (line.charAt(ix) == '1') {
          ones++;
        }
    } {
      if (line.charAt(ix) == '0') {
          zeros++;
        } else if (line.charAt(ix) == '1') {
          ones++;
        }
    } if (line.charAt(ix) == '0') {
          zeros++;
        } else if (line.charAt(ix) == '1') {
          ones++;
        } line.charAt(ix) == '0' line.charAt(ix) line.charAt line ix '0' {
          zeros++;
        } zeros++ zeros if (line.charAt(ix) == '1') {
          ones++;
        } line.charAt(ix) == '1' line.charAt(ix) line.charAt line ix '1' {
          ones++;
        } ones++ ones System.out.println(2 * Math.min(zeros, ones)) System.out.println System.out System System.out 2 * Math.min(zeros, ones) 2 Math.min(zeros, ones) Math.min Math zeros ones String[] args args public class Main {
  public static void main(String[] args) {
    String line = new Scanner(System.in).nextLine();
    int zeros = 0;
    int ones = 0;
    for (int ix = 0; ix < line.length(); ix++) {
      if (line.charAt(ix) == '0') {
          zeros++;
        } else if (line.charAt(ix) == '1') {
          ones++;
        }
    }
    
    System.out.println(2 * Math.min(zeros, ones));
  }
} public class Main {
  public static void main(String[] args) {
    String line = new Scanner(System.in).nextLine();
    int zeros = 0;
    int ones = 0;
    for (int ix = 0; ix < line.length(); ix++) {
      if (line.charAt(ix) == '0') {
          zeros++;
        } else if (line.charAt(ix) == '1') {
          ones++;
        }
    }
    
    System.out.println(2 * Math.min(zeros, ones));
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    String line = new Scanner(System.in).nextLine();
    int zeros = 0;
    int ones = 0;
    for (int ix = 0; ix < line.length(); ix++) {
      if (line.charAt(ix) == '0') {
          zeros++;
        } else if (line.charAt(ix) == '1') {
          ones++;
        }
    }
    
    System.out.println(2 * Math.min(zeros, ones));
  }
}
