n, m = map(int, input().split())
a = []
for i in range(m):
    a.append(int(input()))
mod = 10 ** 9+ 7

com = [0, 1]
for i in range(n):
    if (i + 1) in a:
        com.append(0)
    else:
        com.append((com[-1] + com[-2]) % mod)
print(com[-1])