N,M=map(int,input().split())
list1=[int(input()) for i in range(M)]
list2=[1]
if 1 in list1:
    list2.append(0)
else:
    list2.append(1)
for i in range(N-1):
    if i+2 in list1:
        list2.append(0)
    else:
        list2.append((list2[i]+list2[i+1])%1000000007)
print(list2[N])