s = input()
t = ""
ans = 0
for i in range(len(s)):
    t += s[i]
    #print(t)
    if i+1 = len(s) or i+1+len(t) > len(s):
        ans += 1
        t = ""
    elif s[i+1:i+1+len(t)] != t:
        ans += 1
        t = ""

print(ans)