import numpy as np

N, M = map(int, input().split())
a_l = []
for _ in range(M):
    a_in = int(input())
    a_l.append(a_in)
a = np.array(a_l)

step0 = 1

if 1 in a:
    step1 = 0
else:
    step1 = 1

ans = [step0, step1]
for i in range(2, N+1):
    if i in a:
        now = 0
    else:
        now = ans[-1] + ans[-2]
    ans.append(now)
print(ans[-1] % 1000000007)