#include <bits/stdc++.h>
using namespace std;

int main() {
    int N,M;
    cin>>N>>M;
    int counter=0;
    int count, counter1;
    int a[M]={};
    for(int i=0;i<M;i++){
    cin>>a[i];}
    int dp[100010]{};
    dp[0]=0;
    dp[1]=1;
    if(a[0]==1){
    dp[0]=0;
    counter++;}
    for(int i=2;i<=N;i++){
    dp[i]=(dp[i-1]+dp[i-2])%1000000007;
    if(i==a[counter]){
    dp[i]=0;
    counter++;}}
    cout<<dp[N]<<endl;}
