mod = 1000000007
n,m = map(int, input().split(" "))
a = [int(input()) for i in range(m)]
ans = [0]*(n+1)
ans[0] = 1
for j in range(1,n+1):
  if j in a:
    ans[j] = 0
  else:
    ans[j] = ans[j-1] + ans[j-2]
    ans[j] = ans[j]%mod
print(ans[-1])
      