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