A talent show has performances, each with an excitement score.
The audience applauds after the first performance. After that, they applaud only when a performance has a score strictly greater than every previous score.
Every round of applause lasts exactly seconds. The organizers forgot to include applause in the schedule. How many extra seconds will the show take?
The first line contains and .
The second line contains integers in performance order.
Print the total number of seconds spent applauding.
In Sample 1, performances , , and receive applause: three rounds of four seconds.
In Sample 2, only the first performance receives applause. Tying a previous record does not count.
| Sample Input 1 | Sample Output 1 |
|---|---|
6 4 3 3 2 5 5 8 |
12 |
| Sample Input 2 | Sample Output 2 |
|---|---|
4 7 9 8 9 2 |
7 |