#include #include #include #include #include #include #include #include #include using namespace std; int main() { int n; cin >> n; vector a(n); for(auto&& x : a) { cin >> x; } int max = a.at(0); int count = 0; for(auto&& x : a) { if(x >= max) max = x; else ++count; } cout << count << endl; }