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