n, m = map(int, input().split())
alis = list(int(input()) for _ in range(m))
dp = [-1]*(n+1)
for i in alis:
    dp[i] = 0
# for i in range(n+1):
dp[n] = 1
dp[n-1] = 1
for i in range(2,n+1):
    if dp[n-i] == -1:
        dp[n-i] = dp[n-i+1] + dp[n-i+2]
print(dp[0]%1000000007)