#include<iostream>
#include<string>
#include<vector>
#include<stdio.h>
#include <algorithm>

using namespace std;
#define MAX 1000000007

int memo[MAX];


int dp(int N,int b[]){
    if(N == 0 || b[N] == -1)return 0;
    else if(memo[N]!= 0)return memo[N];
    else return dp(N-1,b) + dp(N-2,b);
}
int main(){
    int N,M;
    cin >> N >> M;
    int a[M];
    int b[N+2];
    memo[0] = 0;
    memo[1] = 1;
    for(int i = 0;i < M;i++){
        cin >> a[i];
        b[a[i]] = -1;
    }
    
    
    cout << dp(N,b)%MAX << endl;

}