s = input()
N = len(s)
i = 0
count = 0
while len(s) > 2:
    print(s)
    if i == 0:
        word =s[i]
        s = s[i+1:]
        count += 1
        last = 1
    if s[i+1] == s[i]:
        s = s[i+2:]
        count += 1
        last = 2
    else:
        word = s[i]
        s = s[i+1:]
        count += 1
        last = 1

if len(s) == 1 and last == 1 and word == s:
    count += 1
print(count)
