#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  vector<long long> s;
  for (int i = 0; i < (int)(S.size()); i++) {
    s.push_back(S[i] - '0');
  }
  long long ans = 0;
  while (true) {
    bool flg = false;
    for (int i = 0; i < (int)(s.size() - 1); i++) {
      if (s[i] + s[i + 1] == 1) {
        ans += 2;
        flg = true;
        s.erase(s.begin() + i, s.begin() + i + 2);
      }
    }
    if (flg == false) break;
  }
  cout << ans;
}
