import numpy as np

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

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

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

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