#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<cmath>
#define mod 998244853 
using namespace std;
int main()
{
	ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int n, m, x;
    cin >> n >> m;
    long long int a[n+1];
    for(int i = 0; i <= n; i++)
        a[i]=0;
    for(int i = 0; i < m; i++)
    {
        cin >> x;
        a[x]=-1;
    }
        a[n]=1;
        if(a[n-1]!=-1)
        {
            if()
            a[n-1]=1;
        }
    for(int i = n-2; i >= 0; i--)
    {
        if(a[i]!=-1)
        {
            if(a[i+1]!=-1)
            {
                a[i]+=a[i+1];
            }
            if(a[i+2]!=-1)
            {
                a[i]+=a[i+2];
            }
            a[i]%=1000000007;
        }
    }
    cout << a[0]%1000000007 << '\n';
}