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