#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  int i = 0, cube = 0;
  cin >> S;
  while (S.size() != 0 && S.find('0') != string::npos &&
         S.find('1') != string::npos) {
    if (S.at(i) != S.at(i + 1)) {
      S.erase(i, 2);
      cube += 2;
      i = 0;
    } else
      i++;
  }
  cout << cube << endl;
}
