#include using namespace std; namespace mci { int n,q; array a; int main () { cin>> n; int rs=0; for (int i=1;i<=n;i++) { cin>> a[i]; rs+=a[i]==1; } int pr=0; for (int i=1;i