#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  string s;
  int ans = 0;
  cin >> s;
  int i = 0;
  while (i < (int)s.length() - 1) {
    if ((s.at(i) == '0' && s.at(i + 1) == '1') ||
        (s.at(i) == '1' && s.at(i + 1) == '0')) {
      s.erase(s.begin() + i, s.begin() + i + 2);
      i = 0;
      ans += 2;
    } else {
      i++;
    }
  }
  cout << ans << endl;
  return 0;
}
