#include <bits/stdc++.h>
#define ll long long

using namespace std;

bool compare(int i,int j)
{
    return i>j;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int N, M;
    cin>>N>>M;
    ll arr[N];
    for (int i=0;i<M;i++)
    {
        int num;
        cin>>num;
        arr[num-1] = -1;
    }
    arr[N-1]=1;
    arr[N-2]=arr[N-2]!=-1;
    {
        if (arr[i]!=-1)
            arr[i] = arr[i+1]+arr[i+2];
        else
            arr[i] = 0;
    }
    cout<<(arr[0]+arr[1])%1000000007;



    return 0;

}
