n, m = map(int, input().split())
broken = [int(input()) for i in range(m)]
dp = [-1 for i in range(n+1)]
dp[0] = 1
dp[1] = 1
for b in broken:
    dp[b] = 0
for i in range(2, n+1):
    if memo[i] == -1:
      memo[i] = memo[i-1] + memo[i-2]
print(memo[n] % (10**9+7))