N, M = map(int, input().split())
A = list([int(input()) for i in range(M)])

stairs = [1] * (N+1)
for i in reversed(range(N+1)):
    if i in A:
        stairs[i] = 0
        continue

    one_step, two_step = 1, 0
    if stairs[i+1:i+2]:
        one_step = stairs[i+1]
    if stairs[i+2:i+3]:
        two_step = stairs[i+2]

    stairs[i] = one_step + two_step
print(stairs[0] % 1000000007)