N,M = map(int,input().split())
check = False
a = []
pass_list = [0]*(N+1)
a.append(int(input()))
for i in range(1,M):
    a.append(int(input()))
    
if(1 not in a):
    pass_list[1]=1
if(2 not in a):
    pass_list[2]=1
for i in range(2,N+1):
    if(i not in a):
        pass_list[i] += pass_list[i-1]+pass_list[i-2]
print(pass_list[N]%1000000007)
