#
import sys
import math
import numpy as np
import itertools

# いくつか入力
n,m = (int(i) for i in input().split())  

# n行の数をリストに
a = [int(input()) for i in range(m)] 
a.append(9999999) # sentinel
dame=0

b=[1]
if a[dame]==1:
    dame += 1
    b.append(0)
MOD = 1000000007

for i in range(2,n+1):
    if i==a[dame]:
        dame += 1
        b.append(0)
    else:
        c=(b[i-1]+b[i-2])%MOD
        b.append(c)

#print(a,b)
print(b[n])
