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