Write a program that reads a sequence of words and prints how many times the last word appears.
Input
Input starts with a natural number n≥1 that indicates how many words are coming. Then, there are n words.
Output
Your program must print, in a line, how many times appears the last word of the sequence.
Observation
Use recursion (not tables).
Input
8 lamb cat dog cat lamb lamb cat dog
Output
2
Input
10 lemon apple pear lemon pear melon orange peach apple apple
Output
3