# C - Typical Stairs

MOD = (10 ** 9) + 7
INF = float('inf')
N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]
dp = [INF] * (N + 1)

def f(i):
    if dp[i] != INF:
        return dp[i]
    else:
        if i in A:
            dp[i] = 0
        elif i < 2:
            dp[i] = 1
        else:
            dp[i] = (f(i - 1) + f(i - 2)) % MOD
        return dp[i]

print(f(N))
