#C4552. Counting Higher Earnings Days

    ID: 48103 Type: Default 1000ms 256MiB

Counting Higher Earnings Days

Counting Higher Earnings Days

You are given a sequence of daily earnings. Your task is to count the number of days on which the earnings were higher than the previous day. Formally, given an array of earnings \(E = [e_0, e_1, \dots, e_{n-1}]\), you need to compute the number of indices \(i\) (with \(1 \leq i e_{i-1}\).

Example: For earnings [200, 250, 180, 300, 350, 400, 320], the answer is 4 because the earnings increased on the 2nd, 4th, 5th, and 6th days.

The input is provided via standard input, and the output should be written to standard output.

inputFormat

The first line of input contains a single integer \(n\) representing the number of days. The second line contains \(n\) space-separated integers representing the earnings for each day.

For example:

7
200 250 180 300 350 400 320

outputFormat

Output a single integer — the number of days on which the earnings were higher than the previous day.

## sample
7
200 250 180 300 350 400 320
4