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

MOD = 10**9+7

step = [0] * (n+1)
step[0] = 1
step[1] = 1

for i in range(n+1):
    if i == 0 or i == 1:
        if i in a:
            step[i] = 0
    else:
        step[i] = step[i-1] + step[i-2]
        if i in a:
            step[i] = 0
        step[i] %= MOD

print(step[-1])
