S = input()
s = list(S)
num = 1

for i in range(1, len(s)):
    if s[i-1] == s[i]:
        s[i] = s[i-1]+s[i]
    else:
        print(s[i])
        num += 1
else:
    if len(s[i]) > 1:num+=1

print(num)