Several children are having lunch at a table. On each turn, one child takes one piece of food from the table.
Some children are impatient and may keep taking food before the others get a fair chance. Just before a child takes a new piece, if that child has already taken more pieces than all other children combined, the mother warns that child.
Given the order in which pieces are taken, count how many warnings the mother gives.
The first line contains an integer N, the number of pieces taken. N is between 1 and 100, inclusive.
Each of the next N lines contains the name of the child who takes one piece. Each name consists only of lowercase English letters and has length at most 20.
Output the number of warnings on a single line.