from collections import deque

mod=10**9+7

N,M=map(int,input().split())
dp=[1,1]
a=deque()
for i in range(M):
    a.append(int(input()))
if a[0]==1:
    dp[1]=0
    a.popleft()
for i in range(2,N+1):
    if len(a)>0 and i==a[0]:
        dp.append(0)
        a.popleft()
    else:
        dp.append((dp[-1]+dp[-2])%mod)
print(dp[-1])