MENANT - Menores al anterior

no tags 

in English

A natural number N and then a sequence of N positive integers is entered. Report how many of the previous numbers are greater than each element.

Input

Natural number + sequence of positive integers.

Output

Quantity of numbers lower than the previous.

Example 1

Input:
5
3
7
2
10
45 Output: 2

en Español

Se ingresa un número natural N y a continuación una secuencia de n números enteros positivos. Indica cuántos de los números anteriores son mayores que cada elemento.

Entrada

Número natural + Secuencia de enteros positivos.

Salida

Cantidad de numeros menores al anterior en la secuencia.

Ejemplo

Input:
5
3
7
2
10
45 Output: 2


Added by:Coach UTN FRSF
Date:2015-08-12
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64 GOSU JS-MONKEY