inp = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n')
N = inp.shift() * 1
a = inp.shift().split(' ')
min = a[0]
c = 1
for (i=1;i<N;i++) {
    if (min > a[i]) {
        c++
        min = a[i]
    }
}
console.log(c)