N,M = map(int,input().split())
hole=[]
for i in range(M):
    hole.append(int(input()))
res = 0

def serach(locale, num):
    global res
    if locale + num > N:
        return

    if locale + num == N:
        res+=1
        return

    if locale + num in hole:
        return

    if res >= 1000000007:
        res=res%1000000007

    serach(locale+num, 1)
    serach(locale+num, 2)

serach(0,1)
serach(0,2)

print(res)
