#include <bits/stdc++.h>
using namespace std;
int dx[4] = {1, 0, 0, -1};
int dy[4] = {0, 1, -1, 0};
const int INF = 1e9 + 7;
int main() {
  string s;
  cin >> s;
  int red = 0, blue = 0;
  int ans = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '1') {
      if (red > 0) {
        red--;
        ans += 2;
      } else {
        blue++;
      }
    } else {
      if (blue > 0) {
        blue--;
        ans += 2;
      } else {
        red++;
      }
    }
  }
  cout << red << " " << blue << endl;
  cout << ans << endl;
  return 0;
}
