import sys for line in sys.stdin: string=line[:-1] uppercase_cont=0 for c in string: if c.isupper(): uppercase_cont+=1 print(uppercase_cont)