import sys

n, m = map(int, sys.stdin.readline().split())
A = [int(sys.stdin.readline()) for _ in range(m)]

dp = [0 for i in range(n+1)]
dp[0] =1
#print(dp)

for i in range(1, n+1):
    if i in A:
        continue
    if i-2>=0:
        dp[i] = dp[i-1] + dp[i-2]
    else:
        dp[i] = dp[i-1]


print(dp[-1]%1000000007)
