n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
mod = 10**9 + 7

def check(arr):
    for i in range(m-1):
      if a[i] + 1 == a[i+1]: return 0
    dp = [0 for _ in range(n+1)]
    dp[0] = 0
    dp[1] = 1
    for i in range(2, n+1):
        if i in a: continue
        dp[i] += dp[i-1] + dp[i-2]
        dp[i] %= mod
    #print(dp)
    return dp[n]

print(check(n))