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

if 1 in A:
  dp_l = [1, 0] + [0]*(n-1)
else:
  dp_l = [1, 1] + [0]*(n-1)
  
for i in range(1, len(dp_l)):
  
  if i in A:
    dp_l[i] = 0
  else:
    dp_l[i] = (dp_l[i-1]+dp_l[i-2])%mod 
  
print(dp_l.pop())