import sys

sys.setrecursionlimit(100000)

N, M = map(int, input().split())
A = []

for _ in range(M):
    a = int(input())
    A.append(a)

d = {}


def f(x):
    # print(d)
    if x in A:
        return 0
    if x > N:
        return 0
    if x == N:
        return 1

    if d.get(x):
        return d[x]

    if d.get(x + 1):
        x1 = d.get(x + 1)
    else:
        x1 = f(x + 1)
        d[x + 1] = x1

    if d.get(x + 2):
        x2 = d.get(x + 2)
    else:
        x2 = f(x + 2)
        d[x + 2] = x2

    ans = x1 + x2
    # ans = f(x + 1) + f(x + 2)
    d[x] = ans
    return ans


print(f(0) % 1000000007)
