# AtCoder Grand Contest 037
# A - Dividing a String

S=input()
ans=set()
for i in range (len(S)):
    a=S[i]
    if a not in ans:
        ans.add(a)
    else:
        for j in range(i+1,len(S)):
            a=S[i:j]
            if a not in ans:
                ans.add(a)
                break
            else:
                continue
# print(ans)
print(len(ans))