s=input()

max_len=0
tmp=""

for i in range(1,len(s)+1):
  last=s[:i]
  cnt=1
  for s_ in s[i:]:
    tmp+=s_
    if tmp != last:
      last=tmp
      tmp=''
      cnt+=1
  max_len=max(max_len,cnt)

print(max_len)