import numpy as np

N, M = map(int, input().split())
holes = []
for i in range(M):
    holes.append(int(input()))

dp = np.zeros(2, dtype=np.int64)
dp[0] = 1
dp[1] = 0 if 1 in holes else 1

for i in range(2, N+1):
    if i in holes:
        tmp = dp[1]
        dp[1] = 0
        dp[0] = tmp
    else:
        tmp = dp[1]
        dp[1] = dp[0] + tmp
        dp[0] = tmp

mod = 1e9 + 7
print(int(dp[-1] % mod))