MOD = 10**9+7
N, M = [int(x) for x in input().split()]
a_list = []
if (M != 0):
    a_list = [int(input()) for _ in range(M)]
dp = [-1] * (N+1)
dp[0] = 1
for a in a_list:
    dp[a] = 0
for i in range(2, N+1):
    if (dp[i] == -1):
        dp[i] = (dp[i-1] + dp[i-2]) % MOD
print(dp[N])
