#include<cstdio>
#include<cstring>
const int N=2e5+5;
int n,k,x,i;
char s[N],c;
int main(){
	scanf("%s",s);n=strlen(s);x=1;
	for (i=0;i<n;i++){
		if (s[i]!=x) x=x?s[i]:1,k++;
		else x=0;
	}
	printf("%d",k);
}