#include <cstdio>

int main() {
    int N, now = 1e9, ans = 0, a;
    scanf("%d", &N);
    for (int i = 0; i < N; ++i) {
        scanf("%d", &a);
        if (a <= now) ++ans, now = a;
    }
    printf("%d\n", ans);
    return 0;
}
