S = input()
Slength = len(S)
current = S[0] # 初期値&現在値
i = 1
ans = 1
while i < Slength:
    judge = True
    j = 0
    while judge:
#         print("current:{}".format(current))
#         print("target:{}".format(S[i:i+j+1]))
        if current == S[i:i+j+1]:
            j += 1
            # 無限ループ回避-------------------
            if i+j+1>=Slength:
                ans -= 1 # breakだと外側のwhileまで抜けられない。
                break
            else:
                pass
            # -------------------------------
        else:
            current = S[i:i+j+1]
            judge = False
    i += j + 1
    ans += 1
#     print("owe")

print(ans)