#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  string s;
  cin >> s;
  int cnt = 0;
  int i = 0;
  while (s.size() != 0 && s.size() != 1) {
    if ((s.at(i) - '0') + (s.at(i + 1) - '0') == 1) {
      s.erase(i, 2);
      i = -1;
      cnt += 2;
    }
    i++;
    if (i == s.size() - 1) break;
  }
  cout << cnt << endl;
  return 0;
}
