#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  vector<char> red_and_white(S.length());
  for (int i = 0; i < S.length(); ++i) {
    red_and_white.at(i) = S[i];
  }
  int delta = count(red_and_white.begin(), red_and_white.end(), '0') -
              count(red_and_white.begin(), red_and_white.end(), '1');
  cout << delta << endl;
  cout << red_and_white.size() - abs(delta) << endl;
  return 0;
}
