s=input()
l=[]
ans=0
last_pos=-1
for i in range(len(s)):
    if i<=last_pos:
        continue
    n=1
    while True:
        t=s[i:i+n]
        if t not in l:
            last_pos=i+n-1
            l.append(t)
            ans+=1
            if last_pos==len(s):
                print(ans)
                #print(l)
                exit()
              
            break
        if i+n==len(s):
            print(ans)
            #print(l)
            exit()
        n+=1
        
        