#!/usr/bin/env python3

from functools import lru_cache


a = {-1}

@lru_cache(maxsize=None)
def near(g):
    d = 99999999
    v = g
    for i in a:
        if abs(g-i) < d:
            d = abs(g-i)
            v = i
    return v


@lru_cache(maxsize=None)
def solv1(n, g):
    if n in a:
        return 0
    if n-g == 0:
        return 1
    if n-g < 0:
        return 0
    count = 0
    if (n-2) not in a:
        count += solv1(n-2, g)
    if (n-1) not in a:
        count += solv1(n-1, g)
    return count


def solv(n, a):
    if n < 100:
        return solv1(n, 0)
    g = near(n // 2)
    if g > 15:
        return solv1(g+1, 0) * solv1(n, g+1)
    else:
        return solv1(g-1, 0) * solv1(n, g-1)


if __name__ == '__main__':

    n, m = map(int, input().split())
    for _ in range(m):
        a.add(int(input()))

    ans = solv(n, a)

    print(ans % 1000000007)
