import sys

import numpy as np



sr = lambda: sys.stdin.readline().rstrip()

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



N = ir()

P = np.array(lr())

P_min = np.minimum.accumulate(P)



answer = np.count_nonzero(P_min >= P)

print(answer)

import sys

import numpy as np



sr = lambda: sys.stdin.readline().rstrip()

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



N = ir()

P = np.array(lr(), np.int32)

P_min = np.minimum.accumulate(P)



answer = np.count_nonzero(P_min >= P)

print(answer)

import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
N = ir()
P = np.array(lr())
P_min = np.minimum.accumulate(P)
answer = np.count_nonzero(P_min >= P)
print(answer)

import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
N = ir()
P = np.array(lr(), np.int32)
P_min = np.minimum.accumulate(P)
answer = np.count_nonzero(P_min >= P)
print(answer)

-P = np.array(lr()) +P = np.array(lr(), np.int32)