P r o b l e m \mathrm{Problem} Problem
First line of input contains two integers n n n and m m m ( 2 ≤ n ≤ 1 0 5 2\le n\le 10^{5} 2≤n≤105 , 2 ≤ m ≤ 1 0 5 2\le m\le 10^{5} 2≤m≤105 ) — the number of rooms and the number of switches.
Next line contains n n n space-separated integers r 1 , r 2 , . . . , r n r_{1},r_{2},...,r_{n} r1,r2,...,rn ( 0 ≤ r i ≤ 1 0\le r_{i}\le1 0≤ri≤1 ) which tell the status of room doors. The i i i -th room is locked if r i = 0 r_{i}=0 r