#include <bits/stdc++.h>
using namespace std;
int main() {
  long long ANS = 0;
  string s;
  char ch = '#';
  cin >> s;
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] == ch) {
      i++;
    } else {
      ch = s[i];
      ANS++;
    }
  }
  cout << ANS + 1 << endl;
}
