#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  string prev;
  string buff;
  cin >> S;
  long l = 0;
  long cnt = 0;
  prev = S[0];
  buff = S[0];
  for (long l = 1; l <= S.length(); l++) {
    if (prev.compare(buff) == 0) {
      buff += S[l];
    } else {
      cout << buff << endl;
      prev = buff;
      cnt++;
      buff = S[l];
    }
  }
  cout << cnt << endl;
}
