On their way back to Azerbaijan from Indonesia, Said, Omar, Fidan and Fuad had a layover at Doha airport. While waiting for their connecting flight, they decided to play cards to spend their time "productively".
A standard deck contains cards of different ranks ('', '', '', '', '', '', '', '', '', '', '', '' and '') and suits (♠, ♣, ♥, ♦). Each player is dealt cards. A player's hand is scored as follows:
each ace ('') is worth points,
each king ('') is worth points,
each queen ('') is worth points,
each jack ('') is worth point,
all other cards (denoted below by '') are worth points.
Since Fuad is new to the game, he decided to practice scoring first. The cards were dealt times, and each time Fuad counted the points in his hand. At the end, he added up all these points.
Now Fuad wants to check whether he calculated the total correctly. Write a program to help him.
The first line contains one integer n~(1 \le n \le 10^4). Each of the next lines contains a string of characters describing Fuad's cards in one deal. Each character is one of '', '', '', '', ''.
Print Fuad's total score over all deals.
Example 2
Example 1