n, m = map(int,input().split())
a = []
for i in range(m):
    a.append(int(input()))
dp = []
dp.append(1)
j = 0
if 1 == a[j]:
    dp.append(0)
    j += 1
else:
    dp.append(1)

for i in range(2,n+1):
    if i == a[j]:
        dp.append(0)
        j += 1
    else:
        dp.append(dp[i-1] + dp[i-2])

print(dp[n]%(1000000007))