from functools import lru_cache
import sys

sys.setrecursionlimit(2*10**5)

# 入力
N, M = map(int, input().split())
a = [int(input()) for _ in range(M)]

MOD = 10**9 + 7
A = set(a)


@lru_cache(maxsize=None)
def f(i):
    return (
        0 if i in A else
        1 if i == 0 or i == 1 else
        (f(i - 1) + f(i - 2)) % MOD
    )


ans = f(N)
print(ans)
