s = input()
c = 0

for i in s:
    if i.isupper():        # i.isupper()用来检测字符是否为大写字母
        c += 1

print(c)