#include <bits/stdc++.h>
using namespace std;
string S;
int ans = 0;
vector<int> X;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> S;
  for (int i = (0); i < (S.size()); ++i) {
    if (S[i] == '1') {
      X.push_back(1);
    } else {
      X.push_back(0);
    }
  }
  X.push_back(99);
  while (1) {
    bool f = true;
    for (int i = (0); i < (X.size() - 1); ++i) {
      if (X[i] + X[i + 1] == 1) {
        f = false;
        ans++;
        X.erase(X.begin() + i, X.begin() + i + 2);
      }
    }
    if (f) break;
  }
  cout << ans * 2 << endl;
}
