#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const ll mod = ll(1e9) + 7;
const int INF = int(1e9);
int main() {
  string S;
  cin >> S;
  int cnt0 = 0, cnt1 = 1;
  for (int i = 0; i < (int)(S.size()); i++) {
    if (S[i] == '0')
      cnt0++;
    else
      cnt1++;
  }
  cout << min(cnt0, cnt1) * 2 << endl;
  return 0;
}
