#include <bits/stdc++.h>
const int xmax = 1e5 + 7;
const int INF = 1e9 + 7;
using namespace std;
int main() {
  char s[1000];
  scanf("%s", s);
  int ans1 = 0, ans2 = 0;
  for (int i = 0; i < strlen(s); i++) {
    if (s[i] == '0')
      ans1++;
    else
      ans2++;
  }
  if (ans1 == 0 || ans2 == 0)
    printf("0");
  else
    printf("%d", min(ans1, ans2) * 2);
  return 0;
}
