#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  string s;
  cin >> s;
  int n = s.length();
  int no0 = 0;
  int no1 = 1;
  for (ll i = 0; i < (n); ++i) {
    if (s[i] == '0')
      no0++;
    else
      no1++;
  }
  cout << min(no0, no1) * 2 << endl;
  return 0;
}
