import sys
input = sys.stdin.readline
mod=10**9+7
n,m=map(int,input().split())
A=[]
for i in range(m):
  a=int(input())
  A.append(a)
S=[0]*(n+1)
S[0]=1
if 1 not in A:
  S[1]=1
for i in range(2,n+1):
  if i in A:
    S[i]=0
  else:
    S[i]=S[i-1]+S[i-2]
print(S[n]%mod)
