import numpy as np

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

step0 = 1
step1 = 0 if (1 in a) else 1

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