S = input()
cnt = 0
for a,b in zip(list(S)[1:],list(S)[:-1]):
    print(a,b)
    if a == b: 
        Flag = True
    else:
        if Flag:
            cnt += 1
            Flag = False

print(len(S)-cnt)