# coding: utf-8
N, M = map(int, input().split())
a = []
for i in range(M):
    a.append(int(input()))
a.append(N+1)
a.append(N+2)
#print("a", a)

dp = [1, 0]
#s = 0
mod = 1000000007

for s in reversed(range(N)):
    if s in a: # xだったら
        dp.insert(0, 0) # 無を代入
        #continue
    else: # oだったら
        t = (dp[0] + dp[1]) % mod
        dp.insert(0, t)
        
print(dp[0])
