#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int main() {
  char a[10010];
  scanf("%s", a);
  long long num1 = 0, num2 = 0;
  for (int i = 0; a[i] != '\0'; i++) {
    if (a[i] == '1') num1++;
    if (a[i] == '0') num2++;
  }
  long long mi = min(num1, num2);
  printf("%lld\n", mi * 2);
  return 0;
}
