while True: try: a = input() res = 0 b = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] for i in a: if i in b: res+=1 print(res) except: break