#include<cstdio>
#include<cstring>
using namespace std;
const int N=200005;
const int C=27;

int len,k;
char s[N];
unsigned long long now,lst;

int main() {
	scanf("%s",s+1);
	len=strlen(s+1);
	for(int i=1;i<=len;i++) {
		now=now*C+s[i]-'a'+1;
		if(lst!=now)
			lst=now,now=0,k++;
	}
	printf("%d\n",k);
	return 0;
}