program march;
var a,d,f,h,i,n,p,s:integer;
j,k:array[1..2000] of integer;
begin
writeln('Vyvedete broq na turistite');
readln(n);
writeln('Vavedete broq na grupite koito iskatte da se polu4at');
readln(p);
for i:=1 to n-1 do
k[i]:=not k[i+1];
for a:=1 to n do
for i:=1 to n do
begin
j[a]:=k[i];
for a:=1 to n do
begin
if j[a]>j[a+1] then
j[a]:=j[a+1];
end;s:=0;
for a:=1 to n do
begin
if j[a]<j[a+1] then
s:=s+1;
end;end;
f:=0;
if s=p then
f:=f+1;
h:=f mod 1020874;
writeln('f=',f);
end.

































