#include using namespace std; int main(void){ // Here your code ! int cnt = 0, last = 0, ans = 0; cin >> cnt; for(int i = 0; i < cnt; i++) { int in; cin >> in; if(in > last) { last = in; } else ans++; } cout << ans; return 0; }