#include <bits/stdc++.h>
    #define y1 sat
    #define dl double
    #define int long long
    #define ff first
    #define ss second
    // #define sz size
    #define pb push_back
    #define wrans cout << -1
    #define neutral cout << 0  
using namespace std;
const int N=1e6+1;
const int M=111;
const int MOD=1e9+7;  
const double long E=2.718281828459045;
const double long pi=3.14159265359;
const long long INF=1e18;
int a[N];
// ╔╗╔╗╔╗╔╗╔╗╔╗╔═╗
// ║║║║║║║║║║║║╚╗║
// ║╚╝║║║║║║╚╝║╔╝║
// ║╔╗║║║║║║╔╗║║╔╝
// ║║║║║╚╝║║║║║╔╗─
// ╚╝╚╝╚══╝╚╝╚╝╚╝─
// int binpow(int a,int b){
//     if(b==0) return 1;    
//     if(b%2 == 0){
//         int x=binpow(a,b/2);
//         return (x*x)%MOD;
//     }
//     else  return (a*binpow(a,b-1))%MOD;
// }
void solve(){
    int n;
    cin >> n;
    int cnt=0;
    for(int i = 1 ; i <= n ;i++){
        cin >> a[i];
    }
    a[0]=13234243;
    for(int i = 1 ; i <= n ; i++){
        if(a[i]<a[i-1]){
            cnt++;
        }
    }
    cout << cnt;
}
signed main(){
    ios_base::sync_with_stdio(false); cin.tie(nullptr);
//  cout.tie(0);
    // for(int i = 2 ; i <= INF ; i++){
    //     if(prime[i]==0){
    //         for(int j = 2 ; i*j<=INF ; j++){
    //             prime[i*j]=1;
    //         }
    //     }
    // }
    // fact();
    int test=1;
    // cin >> test;   
    while(test--){
        solve();
    }
    return 0;
}
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... |