let n=Int(readLine()!)!
let arr=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}

var i = 0
var ans = 1
var m = arr[0]

for i in 1..<n {
  if (m > arr[i]) {
    ans += 1
  }
  m = min(arr[i], m)
}

print(ans)