#include #include using namespace std; int main() { int N, res = 0; vector a; cin >> N; for (int i = 0, x, left; i < N; ++i) { cin >> x; a.push_back(x); if (i == 0) left = x; else if (left > x) ++res; } cout << res << endl; return 0; }