from functools import lru_cache

#入力
n, m = map(int, input().split())
a = []
for i in range(m):
    a.append(int(input()))

#メモ化再帰による計算
@lru_cache(maxsize = 1000)
def code(c):
    if c in a:
        return 0
    if c == 2:
        return 2
    if c <= 1:
        return 1
    return code(c - 1) + code(c - 2)

count = code(n) % 1000000007
print(count)