import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner scn = new Scanner(System.in);
    char[] S = scn.nextLine().toCharArray();

    HashMap<Character, Integer> map = new HashMap<>();
    map.put('0', 0);
    map.put('1', 0);
    for (char ch : S) {
      map.put(ch, map.get(ch) + 1);
    }

    int ans = 2 * Math.min(map.get('0'), map.get('1'));
    System.out.println(ans);

  }

} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner scn = new Scanner(System.in);
    char[] S = scn.nextLine().toCharArray();

    HashMap<Character, Integer> map = new HashMap<>();
    map.put('0', 0);
    map.put('1', 0);
    for (char ch : S) {
      map.put(ch, map.get(ch) + 1);
    }

    int ans = 2 * Math.min(map.get('0'), map.get('1'));
    System.out.println(ans);

  }

} Main public static void main(String[] args) {
    Scanner scn = new Scanner(System.in);
    char[] S = scn.nextLine().toCharArray();

    HashMap<Character, Integer> map = new HashMap<>();
    map.put('0', 0);
    map.put('1', 0);
    for (char ch : S) {
      map.put(ch, map.get(ch) + 1);
    }

    int ans = 2 * Math.min(map.get('0'), map.get('1'));
    System.out.println(ans);

  } main {
    Scanner scn = new Scanner(System.in);
    char[] S = scn.nextLine().toCharArray();

    HashMap<Character, Integer> map = new HashMap<>();
    map.put('0', 0);
    map.put('1', 0);
    for (char ch : S) {
      map.put(ch, map.get(ch) + 1);
    }

    int ans = 2 * Math.min(map.get('0'), map.get('1'));
    System.out.println(ans);

  } Scanner scn = new Scanner(System.in); scn new Scanner(System.in) char[] S = scn.nextLine().toCharArray(); S scn.nextLine().toCharArray() scn.nextLine().toCharArray scn.nextLine() scn.nextLine scn HashMap<Character, Integer> map = new HashMap<>(); map new HashMap<>() map.put('0', 0) map.put map '0' 0 map.put('1', 0) map.put map '1' 0 for (char ch : S) {
      map.put(ch, map.get(ch) + 1);
    } char ch S {
      map.put(ch, map.get(ch) + 1);
    } {
      map.put(ch, map.get(ch) + 1);
    } map.put(ch, map.get(ch) + 1) map.put map ch map.get(ch) + 1 map.get(ch) map.get map ch 1 int ans = 2 * Math.min(map.get('0'), map.get('1')); ans 2 * Math.min(map.get('0'), map.get('1')) 2 Math.min(map.get('0'), map.get('1')) Math.min Math map.get('0') map.get map '0' map.get('1') map.get map '1' System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
  public static void main(String[] args) {
    Scanner scn = new Scanner(System.in);
    char[] S = scn.nextLine().toCharArray();

    HashMap<Character, Integer> map = new HashMap<>();
    map.put('0', 0);
    map.put('1', 0);
    for (char ch : S) {
      map.put(ch, map.get(ch) + 1);
    }

    int ans = 2 * Math.min(map.get('0'), map.get('1'));
    System.out.println(ans);

  }

} public class Main {
  public static void main(String[] args) {
    Scanner scn = new Scanner(System.in);
    char[] S = scn.nextLine().toCharArray();

    HashMap<Character, Integer> map = new HashMap<>();
    map.put('0', 0);
    map.put('1', 0);
    for (char ch : S) {
      map.put(ch, map.get(ch) + 1);
    }

    int ans = 2 * Math.min(map.get('0'), map.get('1'));
    System.out.println(ans);

  }

} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner scn = new Scanner(System.in);
    char[] S = scn.nextLine().toCharArray();

    HashMap<Character, Integer> map = new HashMap<>();
    map.put('0', 0);
    map.put('1', 0);
    for (char ch : S) {
      map.put(ch, map.get(ch) + 1);
    }

    int ans = 2 * Math.min(map.get('0'), map.get('1'));
    System.out.println(ans);

  }

}
