import sys
max_num = 1000000007
input = sys.stdin.readline
N, M = map(int, input().split())
A = list([int(input()) for i in range(M)])

current_step, prev_step, two_prev_step = 0, 1, 0
for i in sorted(range(N), reverse=True):
    if i in A:
        prev_step, two_prev_step = 0, prev_step
        continue

    current_step = prev_step + two_prev_step
    prev_step, two_prev_step = current_step, prev_step

print(current_step % max_num)