
n,m=map(int,input().split())
a=[1]*(n+1)
for i in range(m):
    a[int(input())]=0
memo={}

def count(p):
    if p in memo:
        return memo[p]
    if p==0:
        return 1
    if p==1:
        return a[p]
    if a[p]==1:
        x=count(p-1)+count(p-2)
        memo[p]=x
        return x
    else:
        memo[p]=0
        return 0
print(count(n)%1000000007)
