Mod = 10**9+7
N,M = map(int, input().split())
a = [int(input()) for _ in range(M)]
b = [1]
b_append = b.append
for i in range(1,N+1):
    if i in a:
        b.append(0)
        continue
    if i == 1:
        b.append(1)
        continue
    b.append(b[i-1]+b[i-2])
    if b[i] >= Mod:
        b[i] %= Mod
print(b[N])