import sys
input = sys.stdin.readline

MOD = 1000000007

n, m = [int(i) for i in input().split()]
a = [int(input()) for _ in range(m)]
steps = [0] * (n + 1)
steps[0] = 1

for now in range(n):
    for next_ in range(now + 1, min(now + 2, n) + 1):
        if next_ not in a:
            steps[next_] += steps[now]
            steps[next_] %= MOD
print(steps[-1])

