#include <stdio.h>
#include <math.h>
int all(int st,int goal);
 int main(void){
     double ans=1.0;
    int n, m,i;
 
    int now=0;//to (n)
    scanf("%d %d",&n,&m);
    int data[m];//no enter
    for(i=0;i<m;i++){
        scanf("%d",&data[i]);
        
       
        
        ans=ans*(double)all(now,data[i]-1);
    
        ans=ans%1000000007;
        
        now=data[i]+1;
    }
    
    ans=ans*(double)all(now,n);

    printf("%d\n",ans%1000000007);
  
   
    return 0;
}
int all(int st,int goal){
int na=goal-st+1;
 int ans,i, sut[na];
    if(na==2){
        return 1;
        
    }else if(na<=1){return 0;}
    else{sut[0]=1;
    sut[1]=1;
        
    }
  for (i=2;i<na;i++){
      sut[i]=sut[i-1]+sut[i-2] ;
  }
  return sut[na-1];
}
