output_description: Print the number of integers i that satisfy the condition.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      P_1 ... P_N
attempt: n = int(input())
  i = list(map(int, input().split()))
  l = [[0, 0]] * n
  for k in range(len(i)):
      l[k] = [i[k], k]
  l.sort(reverse=True)
  p = n + 1
  a = 0
  for k in range(len(i)):
      if l[k][1] < p:
          p = l[k][1]
          a += 1
  print(str(a))
  
problem_description: Statement
  
  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.
samples: [{"input": "5\n    4 2 5 1 3", "output": "3\n    \n\ni=1, 2, and 4 satisfy the condition, but i=3 does not - for example, P_i > P_j\nholds for j = 1.  \nSimilarly, i=5 does not satisfy the condition, either. Thus, there are three\nintegers that satisfy the condition.\n\n* * *"}, {"input": "4\n    4 3 2 1", "output": "4\n    \n\nAll integers i (1 \\leq i \\leq N) satisfy the condition.\n\n* * *"}, {"input": "6\n    1 2 3 4 5 6", "output": "1\n    \n\nOnly i=1 satisfies the condition.\n\n* * *"}, {"input": "8\n    5 7 4 2 6 8 1 3", "output": "4\n    \n\n* * *"}, {"input": "1\n    1", "output": "1"}]