import sys
sys.setrecursionlimit(10 ** 6)
n, m =map(int,input().split())
a=[int(input()) for _ in range(m)]
lis={0:1}
def saiki(x):
  if x not in lis:
      if x in a:
        lis[x]=0
        return 0
      elif x==1:
        lis[1]=1
        return 1
      else:
        d=saiki(x-1)+saiki(x-2)
        if d >10**9+7:
          lis[x]= d % (10**9+7)
          return lis[x]
        else:
          lis[x]=d
          return d
  else:
    return lis[x]
      
print(saiki(n))

