S = input()
new_line = ["###header###"]
count = 0
while True:
  flag = 0
  for i in range(1,len(S)):
    if S[0:i] != new_line[-1]:
      new_line.append(S[0:i])
      S = S[i:]
      flag=1
      break
  if flag==0:
    if S[0] != new_line[-1]:
      new_line.append(S[0])
    break

print(len(new_line)-1)