MOD = 10**9 + 7
N,M = map(int,input().split(' '))
broken_list = [int(input()) for i in range(M)]

ans = [0,1]

for n in range(1,N+1):
  if n in broken_list:
    ans.append(0)
  else:
    ans.append(ans[-2]+ans[-1])

print(ans[-1] % MOD)               