s = input()

cnt = 1
flag = 0

for i in range(len(s)-1):
    if flag == 0:
        if s[i] == s[i+1]:
            flag = 1
            cnt += 1
        else:
            cnt += 1
    else:
        flag = 0

print(cnt)