#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define MOD 1000000007 using namespace std; typedef long long ll; int main() { ll n; cin>>n; ll arr[n]; for (ll i=0;i>arr[i]; ll i=0; while (i+1arr[i]) i++; ll k=i+1; if (k==1) { cout<<1<