N, M = map(int, input().split())
A = []
for m in range(M):
    A.append(int(input()))

dp = [0]*(N+2)

dp[N] = 1
dp[N+1] = 0

for i in range(N-1, -1, -1):
    if i in A:
        dp[i] = 0
    else:
        dp[i] = dp[i+1] + dp[i+2]
    
print(dp[0] % 1000000007)