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