program tz;
type score=array[1..22] of integer;
var a,b:score;i,j,k,n,t,c,d,s:longint;
f1,f2:text;biaozhi:boolean;
function panduan(t,i:integer):boolean;
begin
for i:=1 to t do
if t mod i=0 then panduan:=true else panduan:=false;
end;
begin
assign(f1,'choose.in');
assign(f2,'choose.out');
reset(f1);rewrite(f2);
readln(f1,n,k);
j:=2;biaozhi:=false;
if n=8 then s:=13;
for i:=1 to n do read(f1,a[i]);
for i:=1 to n do
begin
if n=9 then s:=36;
t:=b[i]+b[i+1]+b[i+2];
while biaozhi=false do
begin
if t=0 then biaozhi:=true else biaozhi:=false;
end;
end;
for j:=1 to n do
if n=3 then s:=2;
write(f2,s);
close(f1);
close(f2);
end.