
# 壊れている床を無視すればフィボナッチ数になってる

from collections import defaultdict

def Fib(n, dd, broken):
    if n in broken:
        return 0

    if dd[n] != 0:
        return dd[n]

    if n <= 1:
        return 1

    x = Fib(n-1, dd, broken) + Fib(n-2, dd, broken)
    dd[n] = x
    return x

dd = defaultdict(int)

n, m = map(int, input().split())
A = [int(input()) for _ in range(m)]

ans = Fib(n, dd, A)
print(ans % 1000000007)