var a,b,c,n,M,r,i:int64;    //a=a_i、b=a_i-1
    G:array[1..100000] of integer;
begin 
 read(N,M);

  G[1]:=1;G[2]:=1;    //フィボナッチ数列を準備
 for i := 3 to N do
  G[i] := G[i-1] + G[i-2];
 
 n:=1; read(a);     
 if a=1 then c:=1 else c:= a-1;
    n:=n*G[c]; b:=a;
 
 for i := 2 to M do
 begin
   read(a); c:= a-b-1; n:= n*G[c] mod 1000000007;
 end;
 
write(r)
end.