N, M = map(int, input().split())
dp = [1]*(N+2)
dp[N+1] = 0
broken = []
for _ in range(M):
    broken.append(int(input()))
for i in range(N-1, -1, -1):
    if i in broken:
        dp[i] = 0
    else:
        dp[i] = dp[i+1] + dp[i+2]
print(dp[0] % 1000000007)
