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