#include <bits\stdc++.h>

#define FAST {ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);}
#define in insert
#define er erase
#define pb push_back
#define fi first
#define se second
#define ll long long
#define mp make_pair
#define maxn 200005

/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
*/

ll a[maxn], pref[maxn] = {};
ll promena[maxn] = {};

using namespace std;

int main()
{
    FAST
    ll n;
    cin >> n;
    for(int i = 1; i <= n; i++){
        cin >> a[i];
    }
    for(int i = 2; i <= n; i++){
        if(a[i] < a[i - 1])
            promena[i] = 1;
        pref[i] = pref[i - 1] + promena[i];
    }

    return 0;
}