S = input()
a = [S[0]]


for i in range(1, len(S)):
    if len("".join(a)) != i:
        continue
    if S[i-1] != S[i]:
        a.append(S[i])
    elif len(S)-1 != i:
        a.append(S[i:i+len(S[i-1]) + 1])

print(len(a))

