import numpy as np

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

cost = np.zeros(N + 1, dtype=np.int64)
cost[0] = 1
cost[1] = 1
cost[A] = 0
cost[2] = cost[0] + cost[1]

for i in range(1, N + 1):
    cost[A] = 0
    cost[i] = (cost[i - 1] + cost[i - 2]) % q

print(cost[-1])
