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

dp = [1, 1]
def fib(n,a):
  n += 1  
  for i in range(max(n-2,0)):
      dp.append(dp[i]+dp[i+1] if not i+2 in a else 0)
  return dp[n-1]%1000000007

print(fib(n,a))