#include <bits/stdc++.h>
using namespace std;
int main() {
  int total = 0;
  int count = 0;
  char c;
  while (cin >> c) {
    ++total;
    if (c == '1') {
      ++count;
    }
  }
  cout << total << " " << count << endl;
  int sub = total - count;
  if (count > sub) {
    cout << 2 * sub << endl;
  } else {
    cout << 2 * count << endl;
  }
  return 0;
}
