Vasya很喜欢一个coder，他喜欢看那个coder的节目，那个coder每次编程可以得到一个非负分数（不超过10000），而有两种情况能使Vasya惊讶： ·coder得到的分数完全大于过去的分数； ·coder得到的分数完全小于过去的分数。 注意：第一次得到的分数不会使人惊讶。 给定coder编程次数n，给定每次编程得到的分数，请你求出Vasya的惊讶次数。
由 @strike 提供翻译
Vasya adores sport programming. He can't write programs but he loves to watch the contests' progress. Vasya even has a favorite coder and Vasya pays special attention to him.
One day Vasya decided to collect the results of all contests where his favorite coder participated and track the progress of his coolness. For each contest where this coder participated, he wrote out a single non-negative number — the number of points his favorite coder earned in the contest. Vasya wrote out the points for the contest in the order, in which the contests run (naturally, no two contests ran simultaneously).
Vasya considers a coder's performance in a contest amazing in two situations: he can break either his best or his worst performance record. First, it is amazing if during the contest the coder earns strictly more points that he earned on each past contest. Second, it is amazing if during the contest the coder earns strictly less points that he earned on each past contest. A coder's first contest isn't considered amazing. Now he wants to count the number of amazing performances the coder had throughout his whole history of participating in contests. But the list of earned points turned out long and Vasya can't code... That's why he asks you to help him.
The first line contains the single integer $ n $ ( $ 1<=n<=1000 $ ) — the number of contests where the coder participated.
The next line contains $ n $ space-separated non-negative integer numbers — they are the points which the coder has earned. The points are given in the chronological order. All points do not exceed $ 10000 $ .输出格式：
Print the single number — the number of amazing performances the coder has had during his whole history of participating in the contests.
In the first sample the performances number 2 and 3 are amazing.
In the second sample the performances number 2, 4, 9 and 10 are amazing.