S = input()

# stored = set({})
prev = ''

ans = 0
while len(S) > 0:
    j = 1
    while S[:j] == prev:
        j += 1

    if S[:j] == S[j:]:
        j += 1

    prev = S[:j]
    ans += 1
    # stored.add(S[:j])
    # print(j, S[:j], S[j:])
    S = S[j:]

# print(len(stored))
print(ans)