s=input();n=len(s)
now=""
ans=set()
for i in range(n):
    now+=s[i]
    if not (now in ans):
        ans.add(now)
        now=""

ans1=set()
now=""
for i in range(n-1,-1,-1):
    now+=s[i]
    if not (now in ans):
        ans.add(now)
        now=""
print(max(len(ans),len(ans1)))