N, M = map(int, input().split())
ana = []
for _ in range(M):
  ana.append(input())
ans = []
ans.append(1)#一段目まで登る方法は一通り
ans.append(2)#二段目まで登る方法は二通り

for i in range(2,N):
    tmp = i+1
    tmp2 = str(tmp)
    if tmp2 in ana:
        ans.append(0)
    else:
        ans.append(ans[i-1]  + ans[i-2])
print(ans[N-1] % 1000000007)
