#include using namespace std; int main() { int n, abef, aaft, ans = 0; cin >> n >> abef; for(int i = 1; i < n; i++){ cin >> aaft; if(abef > aaft) ans += 1; } cout << ans << endl; return 0; }