MOD = 10**9+7

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

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

print(total[-1] % MOD)