n,m = map(int,input().split())
a = [int(input()) for _ in range(m)]
step = [0] * (n+1)
step[0] = 1
if 1 not in a:
    step[1] = 1
else:
    step[1] = 0
for j in range(2,n+1):
    if j not in a:
        step[j] = step[j-1] + step[j-2]
print(step[n] % 1000000007)