n,m = map(int,input().split())
ss = [1]*n
for i in range(0,m):
    ss[int(input())-1] = 0
if ss[n-3] != 0:
    ss[n-3] = ss[n-2]+ ss[n-1]
for i in range(n-4,-1,-1):
    if ss[i] == 0:
        continue
    ss[i] = ss[i+1] + ss[i+2]
print((ss[0]+ss[1])%(10**9+7))