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

typedef long long ll;
ll memo[100002];
int n;
unordered_set<int> s;

ll dp(ll x){
    if (s.count(x)){
        memo[x] = 0;
        return 0;
    }
    int to_add = 0;
    if (x==n)
    {
        return 1;
    }
    if (memo[x] != -1)
        return memo[x];
    else
    {
        to_add += dp(x+1);
        if (x+2<=n)
            to_add += dp(x+2);
        memo[x] = to_add%1000000007;
    }

}

int main()
{
    memset(memo, -1, sizeof(memo));
    // memo[n] = 1;
    int m, t;
    cin>>n>>m;
    while(m--)
    {
        cin>>t;
        s.insert(t);
    }
    cout<<dp(0)<<'\n';

    return 0;

}