import re
print(len(''.join(re.findall(r'[A-Z]', input()))))