#include <bits/stdc++.h>
using namespace std;
const int INF = 100100100;
const long long LINF = 1e18 + 100;
const int MOD = 1e9 + 7;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ;
  string S;
  cin >> S;
  long long ans = 1;
  bool pass = false;
  cout << S << endl;
  for (int i = (1); i < (S.size()); i++) {
    if (S[i] == S[i - 1] && !pass) {
      pass = true;
      i++;
      ans++;
    } else {
      pass = false;
      ans++;
    }
  }
  if (pass) ans--;
  cout << ans << endl;
}
