S=input()
k=0
s=''
ex_s=''
pos=0

for i in range(len(S)):
  if pos >= i:
    continue
  if pos > len(S):
    break
    
  for j in range(len(S)-i):    
    s=S[i:i+j+1]    
    if ex_s==s:
      continue
    else:
      ex_s=s
      k += 1
      pos = i+j
      break;

print(k)