[n,m] = [int(i) for i in input().split()]
a = []
for i in range(m):
    a.append(int(input()))
dp = [0] * (n+1)
dp[0] = 1
if n > 1:
    for i in range(1,n+1):
        if i not in a:
            if i == 1:
                dp[i] = 1
            else:
                dp[i] = (dp[i-2]%(10 ** 9 + 7))+(dp[i-1]%(10 ** 9 + 7))
        else:
            dp[i] = 0
    print((dp[n])%(10 ** 9 + 7))
else:
    if 1 in a:
        print(0)
    else:
        print(1)
