N,M=map(int, input().split())
a=[int(input()) for _ in range(M)]
D=1000000007

DP=[0 for _ in range(N+10)]
DP[0]=1
for i in range(N):
  for j in [1,2]:
    if i+j not in a:
      DP[i+j]+=DP[i]
      
print(DP[N]%D)