import sys
input = sys.stdin.readline
 
N,M = list(map(int,input().split()))
A = [int(input()) for _ in range(M)]
 
a2 = 1
a1 = 0 if 1 in A else 1
i = 1
def stair(stepb2,stepb1):
    global i
    i+=1
    step = stepb2 + stepb1
    
    if i in A:
        step = 0
    if i == N:
        print(step%1000000007)
        return step
    else:
        stair(stepb1,step)
_ = stair(a2,a1)