n,m = map(int, input().split())
a = [int(input()) for _ in range(m)]

dp = [1,1]
temp = 1
for i in range(2,n+1):
  temp = dp[i-1] + dp[i-2]
  if i in a:
    temp = 0
  dp.append(temp)

print(dp[-1]%1000000007)