#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int k = s.size();
  int x = 0, y = 0;
  if (k == 1) {
    cout << "0";
    return 0;
  }
  for (int i = 0; i < k; i++) {
    if (s[i] == '0')
      x++;
    else
      y++;
  }
  if (x > y)
    cout << x * 2;
  else
    cout << y * 2;
}
