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
for i in range(n+1):
     if i not in a:

         if i == 1:
            l[i] = 1
         elif i >= 2:
            l[i] = l[i-1] + l[i-2]


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