Write a program that reads sequences of natural numbers, and that for each one prints the number of pairs of consecutive numbers such that the second number of the pair is greater than the first one.
Input consists of a natural number , followed by sequences of strictly positive natural numbers. Each sequence ends with a zero.
For every sequence, print in a line the number of pairs of consecutive numbers such that the second number of the pair is greater than the first one.
Input
3 1 2 3 4 0 4 4 3 3 2 2 1 1 0 6 8 4 4 5 0
Output
3 0 2