import java.util.Scanner;

/**
 * Unification
 *
 */
public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String[] target = scanner.nextLine().split("");
    int numOfZero = 0;
    int numOfOne = 0;
    
    for (String s : target) {
      if ("0".equals(s)) numOfZero++;
      if ("1".equals(s)) numOfOne++;
    }
    
    
    if (numOfOne >= numOfZero) {
      System.out.println(2 * numOfZero);
    } else {
      System.out.println(2 * numOfOne);
    }
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String[] target = scanner.nextLine().split("");
    int numOfZero = 0;
    int numOfOne = 0;
    
    for (String s : target) {
      if ("0".equals(s)) numOfZero++;
      if ("1".equals(s)) numOfOne++;
    }
    
    
    if (numOfOne >= numOfZero) {
      System.out.println(2 * numOfZero);
    } else {
      System.out.println(2 * numOfOne);
    }
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String[] target = scanner.nextLine().split("");
    int numOfZero = 0;
    int numOfOne = 0;
    
    for (String s : target) {
      if ("0".equals(s)) numOfZero++;
      if ("1".equals(s)) numOfOne++;
    }
    
    
    if (numOfOne >= numOfZero) {
      System.out.println(2 * numOfZero);
    } else {
      System.out.println(2 * numOfOne);
    }
  } main {
    Scanner scanner = new Scanner(System.in);
    String[] target = scanner.nextLine().split("");
    int numOfZero = 0;
    int numOfOne = 0;
    
    for (String s : target) {
      if ("0".equals(s)) numOfZero++;
      if ("1".equals(s)) numOfOne++;
    }
    
    
    if (numOfOne >= numOfZero) {
      System.out.println(2 * numOfZero);
    } else {
      System.out.println(2 * numOfOne);
    }
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String[] target = scanner.nextLine().split(""); target scanner.nextLine().split("") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner "" int numOfZero = 0; numOfZero 0 int numOfOne = 0; numOfOne 0 for (String s : target) {
      if ("0".equals(s)) numOfZero++;
      if ("1".equals(s)) numOfOne++;
    } String s target {
      if ("0".equals(s)) numOfZero++;
      if ("1".equals(s)) numOfOne++;
    } {
      if ("0".equals(s)) numOfZero++;
      if ("1".equals(s)) numOfOne++;
    } if ("0".equals(s)) numOfZero++; "0".equals(s) "0".equals "0" s numOfZero++ numOfZero if ("1".equals(s)) numOfOne++; "1".equals(s) "1".equals "1" s numOfOne++ numOfOne if (numOfOne >= numOfZero) {
      System.out.println(2 * numOfZero);
    } else {
      System.out.println(2 * numOfOne);
    } numOfOne >= numOfZero numOfOne numOfZero {
      System.out.println(2 * numOfZero);
    } System.out.println(2 * numOfZero) System.out.println System.out System System.out 2 * numOfZero 2 numOfZero {
      System.out.println(2 * numOfOne);
    } System.out.println(2 * numOfOne) System.out.println System.out System System.out 2 * numOfOne 2 numOfOne String[] args args public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String[] target = scanner.nextLine().split("");
    int numOfZero = 0;
    int numOfOne = 0;
    
    for (String s : target) {
      if ("0".equals(s)) numOfZero++;
      if ("1".equals(s)) numOfOne++;
    }
    
    
    if (numOfOne >= numOfZero) {
      System.out.println(2 * numOfZero);
    } else {
      System.out.println(2 * numOfOne);
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String[] target = scanner.nextLine().split("");
    int numOfZero = 0;
    int numOfOne = 0;
    
    for (String s : target) {
      if ("0".equals(s)) numOfZero++;
      if ("1".equals(s)) numOfOne++;
    }
    
    
    if (numOfOne >= numOfZero) {
      System.out.println(2 * numOfZero);
    } else {
      System.out.println(2 * numOfOne);
    }
  }
} Main
import java.util.Scanner;

/**
 * Unification
 *
 */
public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String[] target = scanner.nextLine().split("");
    int numOfZero = 0;
    int numOfOne = 0;
    
    for (String s : target) {
      if ("0".equals(s)) numOfZero++;
      if ("1".equals(s)) numOfOne++;
    }
    
    
    if (numOfOne >= numOfZero) {
      System.out.println(2 * numOfZero);
    } else {
      System.out.println(2 * numOfOne);
    }
  }
}