n,m=map(int,input().split())
mod=10**9+7
if n==1:
  print(1)

if n>1:
  a=[1]*n
  for i in range(m):
    a[int(input())-1]=0
  a[1]=a[0]+1
  for i in range(2,n):
    if a[i]==0:continue
    else:a[i]=a[i-1]+a[i-2]
print(a[n-1]%mod)