import sys
sys.setrecursionlimit(10**7)
def lmi(): return list(map(int, input().split()))

n, m = lmi()
a = [int(input()) for i in range(m)]

l = [0] * (n+1)
l[0] = 1
h = list(range(n+1))
for i in a:
    h.remove(i)
for i in h:
     if i == 1:
        l[i] = 1
     elif i >= 2:
        l[i] = l[i-1] + l[i-2]
        l[i] %= 1000000007


#print(l)
print(l[n] % 1000000007)
