s = input()
for i in s:
    if i.isspace():
        s = s.replace(i,'')
print(len(s))