chars = input()


count = 0

for char in chars:
    if char.isupper():
        count +=1

print(count)