You are the proud owner of a newly opened pizzeria, "Pepperoni Paradise", known for its mouth-watering square pizzas loaded with delicious toppings. However, as orders flood in, it's becoming increasingly challenging to keep track of the quantity of pepperonis on each pizza. To streamline your operations, you decide to develop a program that counts the total number of pepperonis on a given pizza.
Each square pizza at Pepperoni Paradise is represented as an $$$N \times N$$$ grid of upper and lower case alphabet characters. Some of these characters are uppercase or lowercase 'P', denoting big and small pepperonis respectively.
Given the character grid representing a pizza, determine the total quantity of pepperonis on the pizza.
The first line contains a single integer $$$N$$$ $$$(1 \leq N \leq 100)$$$, indicating the size of the pizza grid.
The next $$$N$$$ lines contain $$$N$$$ characters each, representing the pizza grid. Each character will be an uppercase or lowercase letter from '$$$A$$$' to '$$$Z$$$', or '$$$a$$$' to '$$$z$$$'.
Output a single integer, representing the total quantity of pepperonis on the pizza.
3SPWXjSSaO
1
4APZaqPbpcCaAXyPZ
4
| Name |
|---|


