#include <bits/stdc++.h>
using namespace std;
char s[10005];
int main() {
  long long cnt1 = 0, cnt2 = 0;
  scanf("%s", s);
  long long len = strlen(s);
  for (int i = 0; i < len; i++) {
    if (s[i] == '0')
      cnt1++;
    else if (s[i] == '1')
      cnt2++;
  }
  long long minn = 0;
  if (cnt1 >= cnt2)
    minn = cnt2;
  else
    minn = cnt1;
  printf("%lld\n", 2 * minn);
  return 0;
}
