#include <bits/stdc++.h>
using namespace std;
const int MM = 1e9;
const int MOD = MM + 7;
const long double PI = acos(-1);
const long long INF = 1e15;
int dx[8] = {-1, 0, 1, 0, -1, -1, 1, 1};
int dy[8] = {0, -1, 0, 1, -1, 1, 1, -1};
template <typename T>
T GCD(T u, T v) {
  return v ? GCD(v, u % v) : u;
}
template <typename T>
T LCM(T x, T y) {
  T gc = GCD(x, y);
  return x * y / gc;
}
int main() {
  string s;
  cin >> s;
  int n = s.size();
  string tmp1 = "", tmp2 = "";
  int ans = 0;
  if (n == 1) {
    cout << 1 << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      tmp1 += s[0];
      ans++;
    }
    if (tmp1.size() && i != 0) {
      tmp2 += s[i];
      if (tmp1 != tmp2) {
        ans++;
        cout << tmp1 << endl;
        tmp1 = tmp2;
        tmp2 = "";
      }
    }
  }
  cout << ans << endl;
}
