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

out_list = []
for x in range(m):
    out_list.append(int(input()))

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

print(fib(n) % 1000000007)