import sys
n,m=map(int, input().split())
a = [int(input()) for _ in range(m)]
if 1 in a:
    ans = [0,1]+([0]*(n-2))
elif 2 in a:
    ans = [1,0]+([0]*(n-2))
else:
    ans = [1,2]+([0]*(n-2))
if n == 1:
    print(ans[0])
    sys.exit()
elif n == 2:
    print(ans[1])
    sys.exit()
else:
    for i in range(2,n):
        if i+1 not in a:
            ans[i] = (ans[i-1]+ans[i-2])%1000000007
        else:
            ans[i] = 0
    print(ans[len(ans)-1]%1000000007)
    