n,m = map(int,input().split())
a = []
for _ in range(m):
    a.append(int(input()))

if 1 in a:
    b1 = 0
else:
    b1 = 1
if 2 in a:
    b2 = 0
else:
    b2 = b1+1

b3 = 0

for i in range(3,n+1):
    if i in a:
        b3 = 0
    else:
        b3 = b1+b2
    if b3 > 1000000007:
        b3 = b3 % 1000000007
    b1 = b2
    b2 = b3
    if b1==b2==0:
        break

print(b3)