s = input().strip()

old = s[0]
result = 1
two_letter = False
for c in s[1:]:
    print(c, old, two_letter)
    if not two_letter and c == old:
        two_letter = True
        old = c
    else:
        result += 1
        if two_letter:
            old += c
        else:
            old = c
        two_letter = False

print(result)
