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