#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1000000007;
const ll INF = MOD * MOD;
const int inf = (1 << 29);
int main() {
  string S;
  cin >> S;
  int n = S.size();
  int cnt = 0;
  for (int i = 0; i < S.size() - 1; i++) {
    if (S[i] == '0') cnt++;
  }
  cout << 2 * min(cnt, n - cnt) << endl;
  return 0;
  return 0;
}
