n,m = map(int,input().split())
a_list = [int(input()) 
          for nesya in range(m)]
hoge = [1]*(n+1)
for i in range(m):
  hoge[a_list[i]] = 0
for j in range(2,n+1):
  if hoge[j] == 0:
    continue
  else:
    hoge[j] = hoge[j-1] + hoge[j-2]
print(hoge[j]%(10**9+7))