s=input()	
s = s[::-1]

li=[]
cnt = 0
join_str = ""

for i in range(len(s)):
  tmp_str = join_str + s[i]
  if tmp_str in li:
    join_str += s[i]
    
  else :
    li.append(tmp_str)
    join_str = ""
    cnt += 1
  
    
print(cnt)