n, m = list(map(int, input().split()))
a = [int(input()) for _ in range(m)]

MOD = 10**9 + 7
res = [0] * (n+1)
res[0] = 1
res[1] = 1 if 1 not in a else 0

for i in range(2, n+1):
    if i in a:
        continue

    # 到達不可能
    if res[i-1] == 0 and res[i-2] == 0:
        break

    res[i] = (res[i-1] % MOD + res[i-2] % MOD) % MOD

print(res[-1])
