CONST = 10**9 + 7
n,m = map(int,input().split())

dp = [-1 for _ in range(n+1)]
dp[0] = 1
dp[1] = 2
for _ in range(m):
  a = int(input())
  dp[a] = 0
  if a == 0 and  dp[1] ==2:
    dp[1] = 1

for i in range(2,n):
  if dp[i] == 0:
    continue
  dp[i] = (dp[i-1] + dp[i-2]) % CONST
print(dp[n])