#define _USE_MATH_DEFINES #include #define USE_LLONG_AS_INT #ifdef USE_LLONG_AS_INT #define int long long #define inf (1ll<<60) #else #define inf (1<<30) #endif #define rep(i,n) for(int i=0;i=0;i--) #define vi vector #define vvi vector #define vs vector #define pb push_back #define pi pair #define vp vector> #define mp make_pair #define all(v) (v).begin(),(v).end() #define fi first #define se second #define MEMSET(a) memset(a,0,sizeof(a)) #define Yes(f) cout<<(f?"Yes":"No")<()) using namespace std; const int mod=1e9+7; const string sp=" "; void run(); void init() { ios::sync_with_stdio(false); cin.tie(0); cout<>n>>m; vi a(m); rep(i,m)cin>>a[i]; int ans=1; rev(i,m){ if(ans==1)ans=a[i]; else if(ans