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