MOD = 10 ** 9 + 7  # prime number
 
def cmb(n, r, mod=MOD):
    if r < 0 or n < r:
        return 0
    r = min(r, n-r)
    numerator, denominator = 1, 1
    for i in range(1, r + 1):
        numerator = (numerator * (n + 1 - i)) % mod
        denominator = (denominator * i) % mod
    return numerator * pow(denominator, mod - 2, mod) % mod

N,M = map(int,input().split())
ans = 1
broken = [-1]
for i in range(M):
  K = int(input())
  broken.append(K)
broken.append(N+1)
dp = [0]*(N+1)
dp[0]= 1
dp[1]= 1
for k in range(1,N+1):
  if k == 1:
    if k in broken:
      dp[k] = 0
    else:
      dp[1] = 1
  else:
    if k in broken:
      dp[k] = 0
    else:
      dp[k] = dp[k-2]+dp[k-1]
print(dp[N]%(10**9+7))