Mod = 10**9+7
N,M = map(int, input().split())
a = [int(input()) for _ in range(M)]
b = [1]+[0]*N
t = 1
t_1 = 0
t_2 = 0
for i in range(1,N+1):
    if i in a:
        t_1 = t
        t = 0
        continue
    if i == 1:
        t += b[0]
        b[1] = t 
        continue
    t_2 = t_1
    t_1 = t
    t = 0
    t += t_2 + t_1
    b[i] += t
print(b[N]%Mod)