# -*- coding: utf-8 -*-
n,m=map(int,input().split())
a=[]
mod=1000000007
for _ in range(m):
    a.append(int(input()))
if 1 in a:
    ans=[1]+[0]+[0]*(n-1)
else:
    ans=[1]+[1]+[0]*(n-1)
for i in range(2,n+1):
    if i in a:
        ans[i]=0
    else:
        ans[i]=(ans[i-1]+ans[i-2])%mod
print(ans[n])