from functools import lru_cache

n, m = map(int, input().split())

list_f = []
for i in range(m):
    list_f.append(int(input()))

@lru_cache(maxsize=1000)
def test(n):
    if n in list_f:
        return 0 

    if n == 1:
        return 1

    if n == 2:
        return 1
        
    return((test(n - 1) + test(n - 2))%1000000007)

print(test(n))