Ana loves reading stories in different languages. She noticed that
many important words in her favorite texts end with the letter
A. Curious about this pattern, she wants to count how many
words end with the letter A in a given text.
Write a program that reads a sequence of words and counts how many of
them end with the uppercase letter A.
The input consists of a sequence of words separated by spaces and/or
newlines. Each word contains only uppercase letters
A–Z and has at least one letter. The input
ends at end of file.
Print a single integer indicating how many words end with the letter
A.
This problem has been generated by Jutge. Remove this observation after reviewing it carefully.
Input
ANA BANANA APPLE ORANGE MESA PAPA SILLA CASA UVA
Output
7
Input
ANA BOLA CASA PERA PLATANO ZEBRA LLAMA ALBA AURA NINA TACA
Output
10