#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  char bf = ' ';
  bool flag = false;
  int cnt = 0;
  for (int i = 0; i < (s.size()); ++i) {
    if (flag) {
      cnt++;
      flag = false;
      continue;
    }
    cout << bf << s[i];
    if (s[i] == bf) {
      bf = ' ';
      flag = true;
    } else {
      bf = s[i];
      cnt++;
    }
  }
  cout << cnt << endl;
  return 0;
}
