s = input()
count = 0
for i in s:
    if i.isupper():
        count += 1
print(count)