from operator import itemgetter
import sys
input = sys.stdin.readline
n, m = map(int, input().split())
stairs = [0] * (n + 1)
a = [int(input()) for i in range(m)]
mod = (10 ** 9 + 7)
stairs[0] = 1

if n == 1:
    print(1)
    exit()
if n == 2:
    print(2)
    exit()

stairs[1] = 1
for i in a:
    stairs[i] = -100


for i in range(2, n + 1):
    if stairs[i] >= 0:
        stairs[i] = max(stairs[i-1], 0) + max(stairs[i-2], 0)
        stairs[i] = stairs[i] % mod


print(stairs[n] % mod)
