c=0
for x in input():
    if x.isupper():
        c=c+1
print(c)