#include using namespace std; using ll = long long; using ld = long double ; #define rep(i,n) for (ll i=0; i < (n); ++i) #define fi first #define se second const ll mod=998244353ll ; int main(){ ll n ; cin>>n ; assert(n<=2e5) ; vector A(n) ; rep(i,n) cin>>A[i] ; vector pl(n) ; rep(i,n) pl[A[i]]=i ; ll ans=1ll ; ll l=pl[0] ; ll r=pl[0] ; rep(i,n-1){ if(pl[i+1]