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