S = input()
previous_c = S[0]
present_c = ""
total_count = 1
for c in S[1:]:
    present_c += c
    if present_c != previous_c:
        print(previous_c)
        total_count += 1
        previous_c = present_c
        present_c = ""

    else:
        pass
print(total_count)
