n,m = map(int,input().split())
oks = [True]*(n+1)
for i in range(m):
    a = int(input())
    oks[a] = False
print(oks)
dp = [0]*(n+1)
dp[0] = 1
for i in range(n+1):
    for j in range(i+1,min(n+1,i+3)):
        if oks[j]:
            dp[j] += dp[i]
            dp[j] %= 1000000007
print(dp[n])
