N , M = (int(a) for a in input().split())
stair = [1]
brake = []
for i in range(1 , M+1) :
    a = int(input())
    brake.append(a)

for i in range(1, N+1) :
    if i in brake :
        stair.append(0)
    elif i == 1 : 
        stair.append(1) 
    else : stair.append((stair[i-1] + stair[i-2]) % (10**9+7))
         
print(stair[N])



