#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  long long ones = 0;
  long long zeros = 0;
  long long n = s.size();
  for (int i = 0; i < n; i++) {
    if (s[i] == 0)
      zeros++;
    else
      ones++;
  }
  cout << 2 * min(ones, zeros) << endl;
}
