#include <bits/stdc++.h>
int main() {
  char str[1000000];
  long long int z, o;
  for (long long int i = 0; i < 1000000; i++) str[i] == '\n';
  scanf("%s", str);
  for (long long int i = 0; str[i] != '\n'; i++) {
    if (str[i] == '0') z++;
    if (str[i] == '1') o++;
  }
  if (z <= o)
    printf("%lld", z * 2);
  else
    printf("%lld", o * 2);
  return 0;
}
