You are given a text of single-space separated words, consisting of small and capital Latin letters.

Volume of the word is number of capital letters in the word. Volume of the text is maximum volume of all words in the text.

Calculate the volume of the given text.


-----Input-----

The first line contains one integer number n (1 ≤ n ≤ 200) — length of the text.

The second line contains text of single-space separated words s_1, s_2, ..., s_{i}, consisting only of small and capital Latin letters.


-----Output-----

Print one integer number — volume of text.


-----Examples-----
Input
7
NonZERO

Output
5

Input
24
this is zero answer text

Output
0

Input
24
Harbour Space University

Output
1



-----Note-----

In the first example there is only one word, there are 5 capital letters in it.

In the second example all of the words contain 0 capital letters.

Difficulty: interview

Starter code:

Solutions:
input()
def v(x):
    ret = 0
    for i in x:
        if ord('A') <= ord(i) <= ord('Z'):
            ret += 1
    return ret
print(max(v(i) for i in input().strip().split()))


n=int(input())
s=input().split()
mx=0
for c in s:
    tot=0
    for x in c:
        if x==x.upper():
            tot+=1
    mx=max(mx,tot)
print(mx)

n = int(input())
import string
t = input().split(' ')

result = 0

for item in t:
    current = 0
    for letter in item:
        if letter in string.ascii_uppercase:
            current += 1
    result = max(result, current)
print(result)


import sys

def vol(i):
    ans = 0
    for j in i:
        if ('A'<= j<= 'Z'):
            ans += 1
    return ans

n = input()
gg = input().split()
ans = 0
for i in gg:
    ans = max(ans, vol(i))
print(ans)


n = int(input())
s = input().split()
ans = 0
d = set()
for i in s:
    cnt = 0
    for j in i:
        if j >= 'A' and j <= 'Z':
            cnt += 1
    ans = max(cnt, ans)
print(ans)


x=input()
z=input().split()

mx=0
for i in z:
	pres=0
	for a in i:
		if a>='A' and a<='Z':
			pres+=1
	if mx < pres:
		mx=pres
print(mx)

_ = input()
s = input().split(' ')

max_count = 0

for word in s:
    count = 0
    for letter in word:
        if 'A' <= letter <= 'Z':
            count += 1

    max_count = max(count, max_count)

print(max_count)

n=int(input())
a=input().split()
ans=0
for i in a:
	tot=0
	for j in i:
		if(j.isupper()):tot+=1
	ans=max(ans,tot)
print(ans)


input()
words = input().split()
ans = 0
for item in words:
	cnt = 0
	for i in item:
		if( i.isupper() ):
			cnt += 1
	ans = max(ans ,  cnt)
print (ans)

n = int(input())

l = list(map(str, input().split()))
ans = 0
for i in range(len(l)):
  ans = max(ans, sum(map(str.isupper, l[i])))

print(ans)


n = int(input())
words = list(input().split())
volumes = []
for x in words:
    a = 0
    for y in x:
        if y.upper() == y:
            a += 1
    volumes.append(a)
print(max(volumes))

def count_capitals(string):
    count = 0
    for letter in string:
        if letter.upper() == letter:
            count += 1
    return count

n = int(input())

words = [x for x in input().split()]
capitals = []

for word in words:
    capitals.append(count_capitals(word))

print(max(capitals))



n = int(input())
s = input().split()

ans = 0
for i in s:
    tmp = 0
    for j in i:
        if ord('A') <= ord(j) <= ord('Z'):
            tmp += 1
    ans = max(tmp, ans)
    
print(ans)

n=int(input())
L=input().strip().split(' ')
x=0
for i in L:
	z=0
	for k in i:
		if ord(k)<95:
			z+=1
	x=max(x,z)
print(x)

n = int(input())
s = input().split()
i = 0
for j in range(len(s)):
    ss = s[j]
    v = 0
    for k in range(len(s[j])):
        if s[j][k] < 'a':
            v += 1
    i = max(i, v)
print(i)

def Volume(s):
	ans = 0
	for x in s:
		if x >= 'A' and x <= 'Z':
			ans += 1
	return ans

n = int(input());
Text = list(map(str, input().split()));
ans = 0
for x in Text:
	ans = max(ans, Volume(x))
print(ans)


n = int(input())
s = input().split()
ans = 0
for word in s:
	v = 0
	for q in word:
		if (q >= 'A' and q <= 'Z'):
			v += 1
	ans = max(ans, v)
print(ans)

from sys import stdin


def volume_of(s):
    count = 0
    for c in s:
        count += 1 if c.isupper() else 0
    return count


n = int(stdin.readline())
data = stdin.readline().rstrip().split()
print(max(list(map(volume_of, data))))


n = int(input())
a = input().split()
ans = 0
for i in a:
    cnt = 0
    for e in i:
        if e in "ABCDEFGHIJKLMNOPQRSTUVWXYZ":
            cnt += 1
    ans = max(ans, cnt)
print(ans)

n=int(input())
l=list(map(str,input().strip().split(' ')))
ans=-1
for i in range(len(l)):
    c=0
    for j in l[i]:
        if ord(j)<=90 and ord(j)>=65:
            c+=1
    ans=max(c,ans)
print(ans)

def f(word):
    return len(list([x for x in word if x.isupper()]))

_ = input()
s = input().split()
print(max(f(word) for word in s))


n = int(input())
e = input().split(' ')
best = 0
for i in e:
	loc = 0
	for j in i:
		if j.isupper(): loc += 1
	best = max(best, loc)

print(best)

def find(s):
    c=0
    for i in range(len(s)):
        T=s[i]
        if ord(T)<=90 and ord(T)>=65:
            c+=1
    return c
input()
s=list(input().strip().split(' '))
MAX=0
for x in s:
    T=find(x)
    if T>MAX:
        MAX=T
print(MAX)        


input()
l=[i for i in input().split()]
ans = 0
for i in l:
	d=0
	for j in i:
		if j.isupper():
			d+=1
	ans = max(ans,d)
print(ans)		

n=int(input())
l=[i for i in input().split(" ")]
ma=0
for i in l:
    c=0
    for j in i:
        if j.isupper()==True:
            c+=1
    if c>ma:
        ma=c
print(ma)