n, m = list(map(int, input().split()))
a = [int(input()) for _ in range(m)]
b = list(range(1, n+1))
for i in a:
  b.remove(i)

dp = [0] * (n+1)
dp[0] = 1

if b[0] == 1:
  dp[1] = 1
  b.pop(0)
else:
  dp[1] = 0

  
for i in b:
  dp[i] = (dp[i-1]%1000000007 + dp[i-2]%1000000007)%1000000007
  
print(dp[n]%1000000007)
