#include <bits/stdc++.h>
using namespace std;
template <class T>
T gcd(T n, T m) {
  return m ? gcd(m, n % m) : n;
}
long long const N = 200000;
int main() {
  string s;
  cin >> s;
  long long ans = s.size();
  for (int i = 0; i < s.size() - 1; i++) {
    if (s[i] == s[i + 1]) {
      ans--;
      i += 2;
    }
    cout << ans << endl;
  }
}
