#include <bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9 + 7;
using namespace std;
template <typename _Ty>
ostream& operator<<(ostream& ostr, const vector<_Ty>& v) {
  if (v.empty()) {
    ostr << "{ }";
    return ostr;
  }
  ostr << "{" << v.front();
  for (auto itr = ++v.begin(); itr != v.end(); itr++) {
    ostr << ", " << *itr;
  }
  ostr << "}";
  return ostr;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
int main(void) {
  ios::sync_with_stdio(false);
  string S;
  cin >> S;
  long long N;
  N = S.size();
  long long ans = 0;
  long long index = 0;
  string tmp;
  tmp = S[index];
  while (index <= N - 1) {
    string conf;
    conf = S[index + 1];
    if (tmp != conf) {
      ans++;
      index++;
      tmp = S[index];
    } else {
      tmp = S.substr(index + 1, 2);
      index += 2;
      ans++;
    }
    cout << tmp << endl;
  }
  cout << ans << endl;
  return 0;
}
