N,M = map(int,input().split())
a = []
for i in range(M):
    a += [int(input())]

if N == 1:  print(1)
elif N == 2:
    if 1 in a:  print(1)
    else:   print(2)
else:
    temp1, temp2 = 0,0
    if 1 not in a:  temp1 = 1
    if 2 not in a:  temp2 = 1 + temp1
    
    for i in range(2,N):
        temp = 0
        if i+1 not in a:    temp = temp1 + temp2
        temp1 = temp2
        temp2 = temp

print( int(temp % 1000000007) )