import std; void main(){ auto s=readln.chomp.split(" ").to!(int[]); auto N=s[0]; auto Q=s[1]; auto a=new int[N]; auto c=0; for(auto q=0; q