from functools import lru_cache
import sys

sys.setrecursionlimit(1000000)

mod = 10 ** 9 + 7

@lru_cache(maxsize=1000000)
def saiki(i):
    if i == 0:
        return 1
    if i == 1:
        return 1
    if ok[i]:
        return saiki(i - 1) % mod + saiki(i - 2) % mod
    else:
        return 0


n, m = map(int, input().split())
a = [int(input()) for i in range(m)]
ok = [True] * (n + 1)
for i in a:
    ok[i] = False
print(saiki(n) % mod)