MOD = 10**9+7

n,m = (int(x) for x in input().split())
a = []
for i in range(m):
    a.append(int(input()))

#動的計画法？　加算の仕方はフィボナッチ数列みたいな考え方
total = [1]
if 1 not in a:
    total.append(1)
else:
    total.append(0)
#床が抜けているところは０をtotalにpushする
for i in range(2,n+1):
    if i not in a:
        total.append(total[i-1]+total[i-2])
    else:
        total.append(0)

print(total[-1] % MOD)