#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
int main() {
  int i = 1;
  char S[200010];
  char tmp[3] = {' ', '\0'};
  cin >> S;
  tmp[0] = S[0];
  int an = 1;
  while (S[i] != '\0') {
    if (strlen(tmp) == 2) {
      tmp[0] = S[i];
      tmp[1] = '\0';
      an++;
    } else if (S[i] == tmp[0]) {
      tmp[0] = S[i];
      i++;
      if (S[i] != '\0') {
        tmp[1] = S[i];
        tmp[2] = '\0';
        an++;
      } else {
        i--;
      }
    } else {
      tmp[0] = S[i];
      an++;
    }
    i++;
    cout << tmp << "\n";
  }
  cout << an;
}
