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