import java.util.*;

class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    int countZero = 0, countOne = 0;

    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0')
        countZero++;
      else
        countOne++;
    }
    System.out.println(countZero > countOne ? countOne*2 : countZero*2);
  }
} import java.util.*; util.* java class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    int countZero = 0, countOne = 0;

    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0')
        countZero++;
      else
        countOne++;
    }
    System.out.println(countZero > countOne ? countOne*2 : countZero*2);
  }
} Main public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    int countZero = 0, countOne = 0;

    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0')
        countZero++;
      else
        countOne++;
    }
    System.out.println(countZero > countOne ? countOne*2 : countZero*2);
  } main {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    int countZero = 0, countOne = 0;

    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0')
        countZero++;
      else
        countOne++;
    }
    System.out.println(countZero > countOne ? countOne*2 : countZero*2);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int countZero = 0 countZero 0 countOne = 0; countOne 0 for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0')
        countZero++;
      else
        countOne++;
    } 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')
        countZero++;
      else
        countOne++;
    } {
      if (s.charAt(i) == '0')
        countZero++;
      else
        countOne++;
    } if (s.charAt(i) == '0')
        countZero++;
      else
        countOne++; s.charAt(i) == '0' s.charAt(i) s.charAt s i '0' countZero++ countZero countOne++ countOne System.out.println(countZero > countOne ? countOne*2 : countZero*2) System.out.println System.out System System.out countZero > countOne ? countOne*2 : countZero*2 countZero > countOne countZero countOne countOne*2 countOne 2 countZero*2 countZero 2 String args[] args
import java.util.*;

class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    int countZero = 0, countOne = 0;

    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0')
        countZero++;
      else
        countOne++;
    }
    System.out.println(countZero > countOne ? countOne*2 : countZero*2);
  }
}
