#include<bits/stdc++.h>
int N, M, a, p=1000000007;
int main(){
    std::cin >> N >> M;
    int k[N]={},s[N]={1};
    while(std::cin>>a,k[a] = a =1,--M)
    if(s[0] = !k[0], !k[1])s[1] = s[0]+!k[1];
    while(a<N)if(!k[++a])s[a] = (s[a-1] + s[a-2])%p;
    std::cout << (s[N-1]+s[N-2])%p << '\n';
}