#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int k = 1;
  cin >> s;
  for (int i = 1; i < (int)(s.length()); i++) {
    k++;
    if (s[i] == s[i - 1]) i++;
  }
  cout << k << endl;
}
