1697.Text Volume

Time Limit: 1s Memory Limit: 256MB

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 Format(From the terminal/stdin)

The first line contains one integer number n (1 \le n \le 200) - length of the text.

The second line contains text of single-space separated words s1,s2,...,si, consisting only of small and capital Latin letters.

Output Format(To the terminal/stdout)

Print one integer number - volume of text.

Sample Input 1

Copy
7
NonZERO
 \n
       \n

Sample Output 1

Copy
5
 \n

Sample Input 2

Copy
24
this is zero answer text
  \n
    ·  ·    ·      ·    \n

Sample Output 2

Copy
0
 \n

Sample Input 3

Copy
24
Harbour Space University
  \n
       ·     ·          \n

Sample Output 3

Copy
1
 \n

Hints

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.

Submit

请先 登录

© 2025 FAQs