import sys

N , M = (int(a) for a in input().split())
stair = [0]*(N+1)
stair[0] = 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[i] = 0
    elif i == 1 :
        stair[i] = 1
    else : stair[i] = (stair[i-1] + stair[i-2]) % (10**9+7)
         
print(stair[N])



