n, m = map(int, input().split())
keep = [0] * (n + 1)
kep = [-1] * (n + 1)
keep[0] = 1
keep[1] = 1
for i in range(m):
    a = int(input())
    kep[a] = 0
for j in range(2, n + 1):
    keep[j] = [0, keep[j - 2] + keep[j - 1]][kep[j]] % 1000000007
print(keep[n])
