var a,b,N,M,i,n1:int64;    
    G:array[0..100010] of integer;
const p=1000000007;
begin 
 read(N,M);

  G[0]:=0;G[1]:=1;    //フィボナッチ数列を準備
 for i := 2 to N do
  G[i] :=( G[i-1] + G[i-2] ) mod p;
 
   n1:=1; read(a);     
   n1:= n1*G[a] mod p;
  
  for i := 2 to M do
  begin
    b:=a; read(a);   //a=a_i、b=a_(i-1)
    n1:= n1*G[a-b-1] mod p;
  end;
 
  n1:=n1*G[N-a] mod p;

write(n1)
end.