from functools import lru_cache
import sys
sys.setrecursionlimit(500000)
def input() -> str:
    return sys.stdin.readline().rstrip()
mod = 10**9 + 7
@lru_cache(maxsize=None)
def dp(i):
    if i == n - 1:
        return 1
    if i == n - 2:
        return 2 - int(n - 1 in a)
    return (dp(i + 1) * int(i + 1 not in a) % mod + dp(i + 2) * int(i + 2 not in a) % mod) % mod
n, m = [int(i) for i in input().split()]
a = [int(input()) for _ in range(m)]
print(dp(0))