S=input()
leng=len(S)
t=[0]*leng
u=set()
v=set()

for i in range(leng):
  t[i]=S[i]

for j in range(leng):
  if t[j] in u:
    if j!=leng-1:
      t[j+1]=t[j]+t[j+1]
    else:
      pass
  else:
    u.add(t[j])
  
print(len(u))