n,m = map(int,input().split())

h = []
a = 1
b = 1
mod = 10 ** 9 + 7

for i in range(m):
    h += [int(input()),]

for i in range(1,n+1):
    if i in h:
        a,b = 0,a
        # b %= mod
    else:
        a,b = a + b,a
        # a %= mod
        # b %= mod

print(a % mod)