import sys

N, M = map(int,input().split())
a_lists = []

if N == 1:
    if M == 0:
        print (1)
        sys.exit()
    else:
        print(0)
        sys.exit()

for m in range (M):
    temp = int(input())
    a_lists.append(temp-1)
    
datas = [0]*N
if 0 in a_lists:
    datas[0] = 0
else:
    datas[0]=1

if 1 in a_lists:
    datas[1] = 0
else:
    datas[1]= datas[0]+1
    
for i in range (2,N):
    if i in a_lists:
        datas[i] =0
    else:
        datas[i] = datas[i-1] + datas[i -2]

print(datas[-1]%1000000007)