#include #include using namespace std; int N,M,d,now,diff,memo,ans; #define INF 1e9; vector D; int main(){ cin>>N>>M; for(int i=0;i>d; if(d==0)N--; D.push_back(d); } now=0; for(int k=0;k