#C問題
N, M = map(int, input().split())
lack = []
for _ in range(M):
    lack.append(int(input()))

def fib(n):
    if (n == 0) or (n == 1):
        return 1
    elif n in lack:
        return 0
    else:
        return fib(n-1) + fib(n-2)

print(fib(N)%1000000007)