Q = 1000000007
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
dp = {
    0: 1,
    1: 0 if 1 in a else 1
}

for k in range(2, n + 1):
    dp[k] = (0 if k in a else dp[k - 1] + dp[k - 2]) % Q


print(dp[n])
