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