def step_for_two(genzai):
    global kaisu
    for i in range(genzai + 2, N + 1, 2):
        print('step2_i', i)
        if i in break_step:
            print(i, '段目は踏んじゃだめ！')
            step_for_one(i - 1)
        if i == N:
            print('------GOAL------')
            kaisu += 1


def step_for_two_flag(genzai):
    global kaisu
    for i in range(genzai + 2, N + 1, 2):
        print('step2_i', i)
        if i + 2 not in break_step:
            step_for_one(i + 2)
        if i == N:
            print('------GOAL------')
            kaisu += 1


def step_for_one(genzai):
    global kaisu
    for i in range(genzai, N + 1):
        print('step1_i', i)
        if i in break_step:
            print(i, '段目は踏んじゃだめ！')
            step_for_two(i - 1)
        if i == N:
            print('------GOAL------')
            kaisu += 1


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

for soezi, i in enumerate(break_step):
    if break_step[soezi - 1] + 1 == i:
        print(0)
        exit()

kaisu = 0

step_for_one(0)
print('----end_one-----\n')
step_for_two_flag(0)
# step_for_two(0)
print('end_two')

print(kaisu % 1000000007)
