n = int(eval(input()))

d = [int(eval(input())) for i in range(n)]



cnt = 0

value_before = 0

for i in range(n):

    value = max(d)

    if i == 0:

        value_before = value

        d.remove(value)

        cnt += 1

        continue

    if value_before > value:

        value_before = value

        cnt += 1

    d.remove(value)



print(cnt)
def main():

    N = int(eval(input()))

    d = {int(eval(input())) for _ in range(N)}

    print((len(d)))





if __name__ == '__main__':

    main()

n = int(eval(input()))
d = [int(eval(input())) for i in range(n)]
cnt = 0
value_before = 0
for i in range(n):
    value = max(d)
    if i == 0:
        value_before = value
        d.remove(value)
        cnt += 1
        continue
    if value_before > value:
        value_before = value
        cnt += 1
    d.remove(value)
print(cnt)

def main():
    N = int(eval(input()))
    d = {int(eval(input())) for _ in range(N)}
    print((len(d)))


if __name__ == "__main__":
    main()

-n = int(eval(input())) -d = [int(eval(input())) for i in range(n)] -cnt = 0 -value_before = 0 -for i in range(n): -    value = max(d) -    if i == 0: -        value_before = value -        d.remove(value) -        cnt += 1 -        continue -    if value_before > value: -        value_before = value -        cnt += 1 -    d.remove(value) -print(cnt) +def main(): +    N = int(eval(input())) +    d = {int(eval(input())) for _ in range(N)} +    print((len(d))) + + +if __name__ == "__main__": +    main()