n, m = map(int,input().split())
dp = [1]*(n+1)
a = []
for i in range(m):
    ai = int(input())
    a.append(ai)

if 1 in a:
    dp[1] = 0

for i in range(2,n+1):
    if i not in a:
        dp[i] = (dp[i-1] + dp[i-2]) % (10**9+7)
    else:
        dp[i] = 0

print(dp[n])