Simple game#11513

Simple game

1 second
256 megabytes
Very easy

In this task your friend K. will play bridge!

It is known that bridge is played by four players using a -card deck, suits total (clubs, hearts, diamonds, and spades) and values (A, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3 and . At the beginning of the game, each player is dealt cards.

Before starting the game, each player counts their so-called honor points in the following way:

Your friend K. has started playing bridge only recently, so he decided to practice counting points. He dealt himself cards times and each time counted his honor points. In the end, he added them up. He wants to know if he’s done a good job. Help him and check!

Input

The first line contains the integer n\:(1 \le n \le 10^4) from the task.

Each of the following lines contains k_i, a string consisting of characters ’A’, ’K’, ’Q’, ’J’, ’X’, of length , representing the cards your friend K. had in his hand after dealing them for the -th time.

Output

Print the required sum from the task.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading