Given is a permutation P_1, \ldots, P_N of 1, \ldots, N.
Find the number of integers i (1 \leq i \leq N) that satisfy the following condition:  
 - For any integer j (1 \leq j \leq i), P_i \leq P_j.

-----Constraints-----
 - 1 \leq N \leq 2 \times 10^5
 - P_1, \ldots, P_N is a permutation of 1, \ldots, N.  
 - All values in input are integers.

-----Input-----
Input is given from Standard Input in the following format:
N
P_1 ... P_N

-----Output-----
Print the number of integers i that satisfy the condition.

-----Sample Input-----
5
4 2 5 1 3

-----Sample Output-----
3

i=1, 2, and 4 satisfy the condition, but i=3 does not - for example, P_i > P_j holds for j = 1.

Similarly, i=5 does not satisfy the condition, either. Thus, there are three integers that satisfy the condition.
[{"code": "n=int(input())\np=list(map(int,input().split()))\n\nc=1\n\nq=p[0]\n\nfor i in range(1,n):\n    q=min(q,p[i])\n    if p[i]<=q:\n        c+=1\n\nprint(c)", "passed": true, "time": 0.15, "memory": 14236.0, "status": "done"}, {"code": "n = int(input())\np = list(map(int, input().split()))\n\nans = 0\nm = p[0]\n\nfor i in p:\n\tif m >= i:\n\t\tans += 1\n\t\tm = i\n\nprint(ans)", "passed": true, "time": 2.02, "memory": 14284.0, "status": "done"}, {"code": "N = int(input())\nP = [int(i) for i in input().split()]\n\np = N\nans = 0\nfor i in range(N):\n    if p >= P[i]:\n        ans += 1\n        p = P[i]\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}, {"code": "import sys\nimport math\nfrom collections import defaultdict, deque, Counter\nfrom copy import deepcopy\nfrom bisect import bisect, bisect_right, bisect_left\nfrom heapq import heapify, heappop, heappush\n    \ninput = sys.stdin.readline\ndef RD(): return input().rstrip()\ndef F(): return float(input().rstrip())\ndef I(): return int(input().rstrip())\ndef MI(): return map(int, input().split())\ndef MF(): return map(float,input().split())\ndef LI(): return list(map(int, input().split()))\ndef TI(): return tuple(map(int, input().split()))\ndef LF(): return list(map(float,input().split()))\ndef Init(H, W, num): return [[num for i in range(W)] for j in range(H)]\n    \n    \ndef main():\n    N = I()\n    if N == 1:\n        print(1)\n        return\n\n    L = LI()\n    res = 1\n    temp = L[0]\n    for i in L[1:]:\n        if temp >= i:\n            res+=1\n            temp = i\n            \n    print(res)\n    \ndef __starting_point():\n    main()\n__starting_point()", "passed": true, "time": 1.12, "memory": 14204.0, "status": "done"}, {"code": "N = int(input())\nP = [int(i) for i in input().split()]\nans = 0\na = N\nfor i in range(N):\n    if(P[i] <= a):\n        ans += 1\n        a = min(a,P[i])\n        continue\n    a = min(a,P[i])\nprint(ans)", "passed": true, "time": 0.16, "memory": 14208.0, "status": "done"}, {"code": "def main():\n    n = int(input())\n    p = list(map(int,input().split()))\n    minp = p[0]\n    cnt = 0\n    for i in range(n):\n        if p[i]<=minp:cnt+=1\n        minp = min(minp,p[i])\n    print(cnt)\nmain()", "passed": true, "time": 0.14, "memory": 14296.0, "status": "done"}, {"code": "n = int(input())\nL = list(map(int,input().split()))\nmini = L[0]\nans = 0\n\nfor l in L:\n  if mini >= l:\n    ans += 1\n    mini = l\nprint(ans)", "passed": true, "time": 0.14, "memory": 14280.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int, input().split()))\nc = 10 ** 20\ncon = 0\nfor i in range(N):\n  if c > P[i]:\n    con += 1\n    c = P[i]\nprint(con)\n    \n", "passed": true, "time": 0.15, "memory": 14208.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int, input().split()))\n\ncnt = 0\nmina = a[0]\n\nfor i in a:\n    if i <= mina:\n        cnt += 1\n        mina = i\n\nprint(cnt)", "passed": true, "time": 1.91, "memory": 14280.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int,input().split()))\nPm = P[0]\nans = 0\n\nfor i in range(N):\n  if P[i] <= Pm:\n    ans += 1\n    Pm = P[i]\n    \nprint(ans)", "passed": true, "time": 0.14, "memory": 14260.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int, input().split()))\n\nmini = 2*10**5\nans = 0\nfor i in P:\n    if i <= mini:\n        ans += 1\n        mini = i\nprint(ans)", "passed": true, "time": 0.14, "memory": 14184.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int, input().split()))\n\nans = 0\nm = float(\"inf\")\nfor i in range(N):\n  if P[i] <= m:\n    ans += 1\n    m = P[i]\nprint(ans)", "passed": true, "time": 0.14, "memory": 14324.0, "status": "done"}, {"code": "# author:  Taichicchi\n# created: 10.10.2020 13:53:46\n\nimport sys\n\nN = int(input())\n\nP = list(map(int, input().split()))\n\nm = 100000000000000\ncnt = 0\n\nfor i in range(N):\n    if P[i] <= m:\n        cnt += 1\n    m = min(m, P[i])\n\nprint(cnt)\n", "passed": true, "time": 0.14, "memory": 14352.0, "status": "done"}, {"code": "n = int(input())\np_l = list(map(int, input().split()))\nm_p_l = []\nmin_p = float('inf')\nfor i, p in enumerate(p_l):\n    min_p = min(min_p, p)\n    m_p_l.append(min_p)\nans = 0\nfor i, p in enumerate(p_l):\n    if p == m_p_l[i]:\n        ans += 1\nprint(ans)", "passed": true, "time": 1.9, "memory": 14248.0, "status": "done"}, {"code": "\nN = int(input())\nl = list(map(int, input().split()))\n\ncounter = 0\ncurmin = 1e9\nfor i in l:\n    curmin = min(curmin, i)\n    if i == curmin:\n        counter += 1\nprint(counter)\n", "passed": true, "time": 0.14, "memory": 14192.0, "status": "done"}, {"code": "def resolve():\n    n = int(input())\n    p = tuple(map(int,input().split()))\n    min_p = p[0]\n    cnt = 1\n    for i in range(1,n):\n        if min_p > p[i]:\n            min_p = p[i]\n            cnt += 1\n    print(cnt)\nresolve()", "passed": true, "time": 0.19, "memory": 14164.0, "status": "done"}, {"code": "N = int(input())\nP_ls = map(int, input().split(' '))\nmin_val = 10 ** 6\nrst = 0\nfor i in P_ls:\n    if i <= min_val:\n        rst += 1\n        min_val = i\nprint(rst)", "passed": true, "time": 0.14, "memory": 14032.0, "status": "done"}, {"code": "n = int(input())\nalst = list(map(int, input().split()))\nmin_ = alst[0]\nans = 1\nfor a in alst[1:]:\n  if a <= min_:\n    ans += 1\n    min_ = a\nprint(ans)", "passed": true, "time": 0.14, "memory": 14188.0, "status": "done"}, {"code": "N = int(input())\nP = tuple(map(int, input().split()))\n\ncount = 0\nmin_num = float('inf')\nfor i in P:\n    if i < min_num:\n        count += 1\n        min_num = i\n\nprint(count)", "passed": true, "time": 0.14, "memory": 14212.0, "status": "done"}, {"code": "n = int(input())\npl = list(map(int, input().split()))\n\nmin_num = 1001001001\nans = 0\nfor p in pl:\n    if p <= min_num:\n        ans += 1\n        min_num = p\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14208.0, "status": "done"}, {"code": "n = int(input())\npn = [int(num) for num in input().split()]\n \nmaxpj = n+1\nanswer = 0\nfor pi in pn:\n  if pi < maxpj:\n    answer += 1\n    maxpj = pi\n\nprint(answer)", "passed": true, "time": 0.14, "memory": 14212.0, "status": "done"}, {"code": "N=int(input())\nA=list(map(int,input().split()))\ncore=1\nb=A[0]\nfor i in range(1,N):\n    if b>A[i]:\n        core+=1\n        b=A[i]\n    else:\n        pass\nprint(core)", "passed": true, "time": 0.14, "memory": 14068.0, "status": "done"}, {"code": "n = int(input())\nP = list(map(int,input().split()))\nmi = P[0]\nans = 0\nfor i in range(n):\n  if P[i] <= mi:\n    ans += 1\n    mi = P[i]\nprint(ans)", "passed": true, "time": 0.22, "memory": 14212.0, "status": "done"}, {"code": "n = int(input())\np = list(map(int,input().split()))\ncount = 0\na = p[0]\nfor x in range(len(p)):\n  if p[x] <= a:\n    count += 1\n    a = p[x]\n  \nprint(count)\n", "passed": true, "time": 0.14, "memory": 14092.0, "status": "done"}, {"code": "n = int(input())\nlst = list(map(int, input().split()))\n\nm = n+1\nans = 0\n\nfor i in lst:\n    if i < m:\n        ans += 1\n        m = i\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14224.0, "status": "done"}, {"code": "N=int(input())\nP=list(map(int,input().split()))\na=P[0]\nn=1\nfor i in range(N-1):\n    if a>P[i+1]:\n        a=P[i+1]\n        n+=1\nprint(n)", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "import sys\nimport math\nfrom collections import defaultdict, deque, Counter\nfrom copy import deepcopy\nfrom bisect import bisect, bisect_right, bisect_left\nfrom heapq import heapify, heappop, heappush\n    \ninput = sys.stdin.readline\ndef RD(): return input().rstrip()\ndef F(): return float(input().rstrip())\ndef I(): return int(input().rstrip())\ndef MI(): return map(int, input().split())\ndef MF(): return map(float,input().split())\ndef LI(): return list(map(int, input().split()))\ndef TI(): return tuple(map(int, input().split()))\ndef LF(): return list(map(float,input().split()))\ndef Init(H, W, num): return [[num for i in range(W)] for j in range(H)]\n    \n    \ndef main():\n    N = I()\n    if N == 1:\n        print(1)\n        return\n\n    L = TI()\n    res = 1\n    temp = L[0]\n    for i in L[1:]:\n        if temp >= i:\n            res+=1\n            temp = i\n            \n    print(res)\n    \ndef __starting_point():\n    main()\n__starting_point()", "passed": true, "time": 0.18, "memory": 14404.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int,input().split()))\n\ncount = 1\nminP = P[0]\nfor i in range(1,N):\n    if minP > P[i]:\n        count += 1\n    minP = min(minP,P[i])\nprint(count)", "passed": true, "time": 0.14, "memory": 14220.0, "status": "done"}, {"code": "n = int(input())\n\nlst = [ int(i) for i in input().split()]\nmn = lst[0]\ncount = 0\nfor d in lst:\n  if mn >= d:\n    count += 1\n    mn = d\n    \nprint(count)", "passed": true, "time": 0.15, "memory": 14264.0, "status": "done"}, {"code": "n = int(input())\np = list(map(int,input().split()))\nmin_p = n+1\nans = 0\nfor i in range(n):\n    if p[i] < min_p:\n        ans += 1\n        min_p = p[i]\nprint(ans)", "passed": true, "time": 0.14, "memory": 14348.0, "status": "done"}, {"code": "n=int(input())\n\nplist=list(map(int,input().split()))\n\ntmpmin=2*(10**5)\ncount=0\nfor i in range(n):\n    if tmpmin>=plist[i]:\n        tmpmin=plist[i]\n        count+=1\nprint(count)", "passed": true, "time": 0.16, "memory": 14080.0, "status": "done"}, {"code": "n=int(input())\np=list(map(int,input().split()))\nans,m=0,p[0]\nfor i in range(n):\n    m=min(m,p[i])\n    if m==p[i]: ans+=1\nprint(ans)", "passed": true, "time": 0.89, "memory": 14348.0, "status": "done"}, {"code": "n = int(input())\np = list(map(int,input().split()))\n\nmin_num = 10**6\ncnt = 0\nfor i in range(n):\n  if p[i] < min_num:\n    min_num = p[i]\n    cnt += 1\nprint(cnt)", "passed": true, "time": 0.14, "memory": 14120.0, "status": "done"}, {"code": "n = int(input())\ns = list(map(int, input().split()))\n\nmin = s[0]\nans = 0\n\nfor i in range(n):\n    if min >= s[i]:\n        min = s[i]\n        ans += 1\n\nprint(ans)\n", "passed": true, "time": 0.89, "memory": 14308.0, "status": "done"}, {"code": "n = int(input())\np = list(map(int, input().split()))\nans = 0\nmn = float('inf')\nfor i in range(n):\n    mn = min(p[i], mn)\n    if mn == p[i]:\n        ans += 1\nprint(ans)", "passed": true, "time": 0.32, "memory": 14280.0, "status": "done"}, {"code": "n = int(input())\na = list(map(int,input().split()))\ncount = 0\nmina = n + 1\nfor i in a:\n    if mina >= i:\n        count += 1\n        mina = i\n\nprint(count)", "passed": true, "time": 0.14, "memory": 14288.0, "status": "done"}, {"code": "N = int(input())\nS = list(map(int,input().split()))\n\ncnt = 1\nmin_n = S[0]\nfor n in S[1:]:\n  #print(min_n,n)\n  if n <= min_n:\n    min_n = n\n    cnt += 1\n    \nprint(cnt)\n", "passed": true, "time": 0.33, "memory": 14268.0, "status": "done"}, {"code": "n = int(input())\np = list(map(int,input().split()))\n\nmini = float(\"inf\")\ncnt = 0\nfor i in range(n):\n    if p[i] <= mini:\n        cnt += 1\n        mini = p[i]\nprint(cnt)", "passed": true, "time": 0.14, "memory": 14260.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int, input().split()))\n\nans = 0\ncheck = 10**9 + 7\n\nfor i in range(N):\n    if check > P[i]:\n        ans += 1\n        check = P[i]\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14124.0, "status": "done"}, {"code": "n = int(input())\np = list(map(int,input().split()))\nmin = p[0]\nans = 0\nfor i in range(n):\n    if min >= p[i]:\n        ans += 1\n        min = p[i]\nprint(ans)", "passed": true, "time": 0.15, "memory": 14120.0, "status": "done"}, {"code": "N=int(input())\nP=list(map(int,input().split()))\nans=0\nmini=10**6\nfor p in P:\n    if p<=mini:\n        mini=p\n        ans+=1\nprint(ans)", "passed": true, "time": 0.15, "memory": 14336.0, "status": "done"}, {"code": "def main():\n\tn = int(input())\n\tp = [int(v) for v in input().split()]\n\tans = 1\n\tsofar = p[0]\n\tfor i in range(1, len(p)):\n\t\tsofar = min(p[i-1],sofar)\n\t\tif p[i] < sofar:\n\t\t\tans +=1\n\treturn ans\n\ndef __starting_point():\n    print((main()))\n\n__starting_point()", "passed": true, "time": 0.28, "memory": 14324.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int, input().split()))\nans = 0\nnum = P[0]\n\nfor i in range(N):\n    if num >= P[i]:\n        ans += 1\n        num = P[i]\n\nprint(ans)\n", "passed": true, "time": 0.3, "memory": 14300.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int, input().split()))\n\ndp = [0] * N\ndp[0] = P[0]\nans = 1\nfor i in range(1, N):\n    if P[i] <= dp[i - 1]:\n        dp[i] = P[i]\n        ans += 1\n    else:\n        dp[i] = dp[i - 1]\n\nprint(ans)\nreturn", "passed": true, "time": 0.14, "memory": 14404.0, "status": "done"}, {"code": "n = int(input())\np = list(map(int, input().split()))\n\nmin = p[0]\ncount = 1\n\nfor i in range(1,n):\n    if p[i] <= min:\n        count += 1\n        min = p[i]\n\nprint(count)", "passed": true, "time": 0.15, "memory": 14056.0, "status": "done"}, {"code": "n = int(input())\nP = list(map(int, input().split()))\nminSoFar = 2 * 10**5 + 1\nans = 0\nfor i in range(n):\n    if P[i] < minSoFar:\n        ans += 1\n    minSoFar = min(minSoFar, P[i])\nprint(ans)", "passed": true, "time": 0.15, "memory": 14276.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int, input().split()))\n\ncnt = 0\n\nfor p in P:\n    cnt += p <= N\n    N = min(N, p)\n\nprint(cnt)", "passed": true, "time": 0.15, "memory": 14176.0, "status": "done"}, {"code": "#!/usr/bin/env python3\ndef main():\n    _ = int(input())\n    P = [int(x) for x in input().split()]\n\n    res = P[0]\n    ans = 0\n    for p in P:\n        if p <= res:\n            ans += 1\n            res = p\n    print(ans)\n\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.14, "memory": 14256.0, "status": "done"}, {"code": "N=int(input())\nP=list(map(int,input().split()))\nm=N\nans=0\nfor i in range(N):\n    if m>=P[i]:\n        ans+=1\n    m=min(m,P[i])\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14292.0, "status": "done"}, {"code": "N = int(input())\np = [int(n) for n in input().split()]\n\ncount = 1\nval_min = p[0]\nfor i in range(1, N):\n    if val_min >= p[i]:\n        count += 1\n       \n    val_min = min(val_min, p[i])\n\nprint(count)", "passed": true, "time": 0.14, "memory": 14076.0, "status": "done"}, {"code": "import sys\n\nn = int(input())\np = list(map(int,input().split()))\nmin = sys.maxsize\ncnt = 0\n\nfor i in range(n):\n    if min >= p[i]:\n        min = p[i]\n        cnt += 1\n\nprint(cnt)", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "N = int(input())\np = list(map(int, input().split()))\n \n# \u6761\u4ef6\u306fN=O(10^5)\u3088\u308aO(N)\u3067\u89e3\u304f\n# \u4e8c\u91cd\u30eb\u30fc\u30d7\u3092\u3059\u308b\u3068\u3001O(N^2)\u3067\u9593\u306b\u5408\u308f\u306a\u3044\n# \u7d2f\u7a4d\u548c\u306e\u554f\u984c\uff08ABC-154-D\u3068\u304b\uff09\u3068\u540c\u3058\u767a\u60f3\u304c\u4f7f\u3048\u308b\uff01\n \n# \u5177\u4f53\u7684\u306bO(N)\u3067\u89e3\u304f\u305f\u3081\u306b\u3001\u6700\u521d\u306b\u5404i\u306b\u5bfe\u3057\u3066\u3001i\u756a\u76ee\u307e\u3067\u306e\u6700\u5c0f\u5024\u3092\u6c42\u3081\u3066\u304a\u304f\nm = [0]*(N)\nm[0] = p[0]\nfor i in range(1, N):\n  m[i] = min(m[i-1], p[i])\n\n# \u5404i\u307e\u3067\u306e\u6700\u5c0f\u5024\u3068i\u756a\u76ee\u306e\u5024\u3092\u6bd4\u8f03\u3057\u3001\u6700\u5c0f\u5024\u306e\u65b9\u304c\u5927\u304d\u3051\u308c\u3070\u3088\u3044\nans = 1\nfor i in range(1, N):\n  if m[i-1] >= p[i]: ans += 1\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14100.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int,input().split()))\n\nans = N\nmin_val = N\n\nfor i in range(N):\n    target = P[i]\n\n    if target < min_val:\n        min_val = target\n\n    if min_val < target:\n        ans -= 1\n\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14204.0, "status": "done"}, {"code": "n = int(input())\np = [int(s) for s in input().split()]\n\nans = 1\nmin_val = p[0]\nfor i in range(1, n):\n    if p[i] <= min_val:\n        min_val = p[i]\n        ans += 1\nprint(ans)", "passed": true, "time": 0.14, "memory": 14164.0, "status": "done"}, {"code": "n = int(input())\np = list(map(int,input().split()))\nans = 0\nfor i in range(n):\n    if (i == 0):\n        ans = ans + 1\n        x = p[0]\n    else:\n        if (x < p[i]):\n            pass\n        else:\n            ans = ans + 1\n            x = p[i]\n\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14100.0, "status": "done"}, {"code": "n = int(input())\np = list(map(int, input().split()))\n\nans = 1\ncur_min = p[0]\n\nfor i in range(1, n):\n\tcur_min = min(p[i - 1], cur_min)\n\tif p[i] <= cur_min:\n\t\tans += 1\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14236.0, "status": "done"}, {"code": "n = int(input())\np = list(map(int,input().split()))\nans = 0\nm = 10**18\n\nfor i in p:\n    if m > i:\n        m = i\n        ans += 1\nprint(ans)", "passed": true, "time": 0.51, "memory": 14216.0, "status": "done"}, {"code": "N = int(input())\nP_ls = map(int, input().split(' '))\nmin_val = 10 ** 6\nrst = 0\nfor i in P_ls:\n    if i <= min_val:\n        rst += 1\n        min_val = i\nprint(rst)", "passed": true, "time": 0.27, "memory": 14064.0, "status": "done"}, {"code": "N = int(input())\nP_ls = list(map(int, input().split(' ')))\nmin_val = 10 ** 6\nrst = 0\nfor i in P_ls:\n    if i <= min_val:\n        rst += 1\n        min_val = i\nprint(rst)", "passed": true, "time": 0.14, "memory": 14092.0, "status": "done"}, {"code": "n=int(input());a=[*map(int,input().split())];count,m=0,n+1\nfor i in a:\n  if m>i: m=i;count+=1\nprint(count)", "passed": true, "time": 0.15, "memory": 14180.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int, input().split()))\n\ncnt = 0\nmini = float('inf')\n\nfor i in range(0, len(P)):\n    if P[i] < mini:\n        cnt += 1\n        mini = P[i]\n\nprint(cnt)", "passed": true, "time": 0.15, "memory": 14252.0, "status": "done"}, {"code": "# C\nN = int(input())\nP = list(map(int,input().split()))\nmin_p = 10**10\nans = 0\nfor i in range(N):\n  if min_p >= P[i]:\n    ans += 1\n  min_p = min(min_p,P[i])\nprint(ans)", "passed": true, "time": 0.24, "memory": 14220.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int, input().split()))\n\nS = sorted(P, reverse = True)\ncn = 0\nL = []\n\n\n\nfor i in range(N):\n    if i == 0:\n        cn = cn + 1\n        L.append(P[i])\n\n    else:\n        if P[i] > L[0]:\n            continue\n                \n        else:\n            cn = cn + 1\n            L.append(P[i])\n            L.pop(0)\n\n\nprint(cn)", "passed": true, "time": 0.14, "memory": 14116.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int, input().split()))\na = 0\nfor p in P:\n    if p <= N:\n        a += 1\n        N = p\nprint(a)", "passed": true, "time": 0.14, "memory": 14064.0, "status": "done"}, {"code": "N=int(input())\nlst = [int(n) for n in input().split()]\nm=999999\ncnt = 0\nfor l in range(N):\n    m = min(m,lst[l])\n    if m==lst[l]:\n        cnt+=1\nprint(cnt)\n", "passed": true, "time": 0.16, "memory": 14304.0, "status": "done"}, {"code": "N = int(input())\nP_list = list(map(int, input().split()))\n\nnum_min = 2 * (10 ** 5)\nans = 0\n\nfor i in P_list:\n    if num_min >= i:\n        num_min = i\n        ans += 1\n    else:\n        continue\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14100.0, "status": "done"}, {"code": "N = int(input())\nP_ls = list(map(int, input().split(' ')))\nmin_val = 10 ** 6\nrst = 0\nfor i in P_ls:\n    if i <= min_val:\n        rst += 1\n        min_val = i\nprint(rst)", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "N = int(input()) \ns = list(map(int,input().split()))\ntemp=1000000\ncount=0\nfor i in range(N):\n    if temp>s[i]:\n        count =count+1\n        temp=s[i]\n\nprint(count)\n", "passed": true, "time": 0.15, "memory": 14116.0, "status": "done"}, {"code": "n=int(input())\np=list(map(int,input().split()))\nans=0\nm=2*10**5+1\nfor i in range(n):\n    if m>p[i]:\n        m=p[i]\n        ans+=1\nprint(ans)", "passed": true, "time": 0.14, "memory": 14340.0, "status": "done"}, {"code": "N = int(input())\nP_ls = list(map(int, input().split(' ')))\nmin_val = 10 ** 6\nrst = 0\nfor i in P_ls:\n    if i <= min_val:\n        rst += 1\n        min_val = i\nprint(rst)", "passed": true, "time": 0.14, "memory": 14120.0, "status": "done"}, {"code": "n=int(input())\na=list(map(int,input().split()))\nc=0\nj=float('inf')\nfor i in a:\n    if i<j:\n        c+=1\n        j=i\nprint(c)", "passed": true, "time": 0.14, "memory": 14244.0, "status": "done"}, {"code": "n = int(input())\np = list(map(int, input().split()))\nans = 1\np_min = p[0]\n\nfor i in range(1,n):    \n    if p_min >= p[i]:\n        ans += 1\n    p_min = min(p_min, p[i])\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14128.0, "status": "done"}, {"code": "n=int(input())\nl=list(map(int,input().split()))\na=n+1\nans=0\nfor i in range(n):\n    if l[i]<=a:\n        ans+=1\n        a=l[i]\nprint(ans)", "passed": true, "time": 0.22, "memory": 14116.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int, input().split()))\nMin = P[0]\ncount = 0\nfor i in range(N):\n    if Min >= P[i]:\n        count += 1\n        Min = P[i]\nprint(count)", "passed": true, "time": 0.15, "memory": 14044.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int, input().split()))\n\nans=1\n\np=P[0]\n\nfor i in range(N) :\n    if p > P[i]:\n        ans = ans + 1\n        p = P[i]\n    \n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14052.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int,input().split()))\nm = P[0]\nk = 1\nfor j in range(N-1):\n  i = j+1\n  if m >= P[i]:\n    k += 1\n  m = min(m,P[i])\nprint(k)  \n", "passed": true, "time": 0.14, "memory": 14260.0, "status": "done"}, {"code": "n=int(input())\np=list(map(int,input().split()))\n\nmin=p[0]\ncnt=0\nfor i in range(n):\n    if min>=p[i]:\n        cnt+=1\n        min=p[i]\nprint(cnt)\n", "passed": true, "time": 0.14, "memory": 14276.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int,input().split()))\nT = [P[0]]+[10**10]*(N-1)\nans = 0\n\nfor i in range(N):\n    T[i] = min(T[i-1],P[i])\n    if P[i] <= T[i]:\n        ans += 1\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "n = int(input())\np = list(map(int, input().split()))\nmi = p[0]\nres = 0\nfor v in p:\n    mi = min(v, mi)\n    if mi == v:\n        res += 1\nprint(res)", "passed": true, "time": 0.14, "memory": 14156.0, "status": "done"}, {"code": "from sys import setrecursionlimit, exit\nsetrecursionlimit(1000000000)\n\ndef main():\n    n = int(input())\n    p = list(map(int, input().split()))\n    ans = 1\n    minimum = p[0]\n    for i in range(1, n):\n        if minimum >= p[i]:\n            ans += 1\n            minimum = p[i]\n    print(ans)\n\nmain()", "passed": true, "time": 0.14, "memory": 14208.0, "status": "done"}, {"code": "N=int(input())\nP=list(map(int, input().split()))\n\nans=0\ntempmin=P[0]\n\nfor i in range(N):\n\tif tempmin>=P[i]:\n\t\t#print(tempmin,P[i])\n\t\tans+=1\n\ttempmin=min(tempmin,P[i])\n\t\nprint(ans)", "passed": true, "time": 0.14, "memory": 14320.0, "status": "done"}, {"code": "n = int(input())\np = list(map(int, input().split()))\n\n\nlow = 3 * 10 ** 5\ncnt = 0\n\nfor x in p:\n    if x < low:\n        cnt += 1\n        low = x\nprint(cnt)", "passed": true, "time": 0.14, "memory": 14284.0, "status": "done"}, {"code": "n = int(input())\np = list(map(int,input().split()))\nminp = p[0]\ncnt = 0\nfor i in range(n):\n    if p[i]<=minp:cnt+=1\n    minp = min(minp,p[i])\nprint(cnt)", "passed": true, "time": 0.14, "memory": 14292.0, "status": "done"}, {"code": "n = int(input())\nP = list(map(int, input().split()))\nans = 0\nm = 200002\nfor p in P:\n    if p <= m:\n        m = p\n        ans += 1\nprint(ans)", "passed": true, "time": 0.14, "memory": 14292.0, "status": "done"}, {"code": "n = int(input())\nnum_list = list(map(int, input().split()))\n\ncnt = 0\nmin = num_list[0]\nfor i in range(n):\n    if num_list[i] <= min:\n        min = num_list[i]\n        cnt += 1\n\nprint(cnt)", "passed": true, "time": 0.14, "memory": 14084.0, "status": "done"}, {"code": "N = int(input())\nP_ls = list(map(int, input().split(' ')))\nrst, min_val = 0, 10 ** 6\nfor i in P_ls:\n    if min_val >= i:\n        rst += 1\n        min_val = i\nprint(rst)", "passed": true, "time": 0.2, "memory": 14224.0, "status": "done"}, {"code": "n = int(input())\np = list(map(int, input().split()))\nmini = p[0]\nans = 0\nfor i in p:\n  if i <= mini:\n    ans += 1\n  mini = min(mini,i)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14300.0, "status": "done"}, {"code": "n = int(input())\nx = list(map(int,input().split()))\ncount = 1\nm = x[0]\n\nfor i in range(1,n):\n  if m >=x[i]:\n    count+=1\n    m = x[i]\n  \nprint(count)", "passed": true, "time": 0.27, "memory": 14212.0, "status": "done"}, {"code": "# coding: utf-8\n\ndef main():\n    N = int(input())\n    tmp = 200001\n    ans = 0\n    A = list(map(int, input().split()))\n\n    for a in A:\n        if a < tmp:\n            ans += 1\n            tmp = a\n\n    print(ans)\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.27, "memory": 14212.0, "status": "done"}, {"code": "N=int(input())\nP=list(map(int,input().split()))\n\ntmp=N\ncnt=0\nfor i in range(N):\n    tmp=min(tmp,P[i])\n    if tmp>=P[i]:\n        cnt+=1\nprint(cnt)", "passed": true, "time": 0.27, "memory": 14140.0, "status": "done"}, {"code": "N = int(input())\nP_ls = map(int, input().split(' '))\nmin_val = 10 ** 6\nrst = 0\nfor i in P_ls:\n    if i <= min_val:\n        rst += 1\n        min_val = i\nprint(rst)", "passed": true, "time": 0.14, "memory": 14192.0, "status": "done"}, {"code": "N = int(input())\nP_ls = map(int, input().split(' '))\nmin_val = 10 ** 6\nrst = 0\nfor i in P_ls:\n    if i <= min_val:\n        rst += 1\n        min_val = i\nprint(rst)", "passed": true, "time": 0.23, "memory": 14248.0, "status": "done"}, {"code": "#-*-coding:utf-8-*-\nimport sys\ninput=sys.stdin.readline\n\ndef main():\n    numbers=[]\n    n = int(input())\n    numbers=list(map(int,input().split()))\n    small=0\n    dp=[]\n\n    for idx,data in enumerate(numbers):\n        if idx == 0:\n            small=data\n            dp.append(data)\n        elif data < small:\n            small=data\n            dp.append(data)\n        else:\n            continue\n    print(len(dp))\n\ndef __starting_point():\n    main()\n__starting_point()", "passed": true, "time": 0.2, "memory": 14096.0, "status": "done"}, {"code": "def N():\n    return int(input())\ndef L():\n    return list(map(int,input().split()))\ndef NL(n):\n    return [list(map(int,input().split())) for i in range(n)]\nmod = pow(10,9)+7\n\n#import numpy as np\nimport sys\nimport math\nimport collections\n\nn = N()\np = L()\nmi = sys.maxsize\ncnt = 0\nfor i in p:\n    if i <= mi:\n        cnt += 1\n        mi = i\nprint(cnt)", "passed": true, "time": 0.14, "memory": 14180.0, "status": "done"}, {"code": "n=int(input())\na=list(map(int,input().split()))\nc=0\nj=float('inf')\nfor i in a:\n    if i<j:\n        c+=1\n    j=min(j,i)\nprint(c)", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "def main():\n\tn = int(input())\n\tp = [int(v) for v in input().split()]\n\tans = 1\n\tsofar = p[0]\n\tfor i in p:\n\t\tif i < sofar:\n\t\t\tans +=1\n\t\t\tsofar = i\n\treturn ans\n\ndef __starting_point():\n    print((main()))\n\n__starting_point()", "passed": true, "time": 0.14, "memory": 14064.0, "status": "done"}, {"code": "N = int(input())\nP = list(map(int,input().split()))\nT = [P[0]]+[10**10]*(N-1)\nans = 0\n\nfor i in range(N):\n    T[i] = min(T[i-1],P[i])\n\nfor i in range(N):\n    if P[i] <= T[i]:\n        ans += 1\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14392.0, "status": "done"}, {"code": "n = int(input())\nnum = list(map(int,input().split()))\ncount = 10**18\nans = 0\n\nfor i in num:\n  if count > i:\n    count = i\n    ans += 1\n  \nprint(ans) ", "passed": true, "time": 0.22, "memory": 14272.0, "status": "done"}]