n, m = map(int, input().split())
a1_n = set([int(input()) for _ in range(m)])
P = 1000000007

pos_to_cnt = {
    0: 1
}
result = 0
while len(pos_to_cnt) > 0:
    new_pos_to_cnt = {}
    for p, c in pos_to_cnt.items():
        for steps in [1, 2]:
            new_pos = p + steps
            if new_pos <= n:
                new_pos_to_cnt[new_pos] = (new_pos_to_cnt.get(new_pos, 0) + c) % P
            else:
                break
    available_positions = set(new_pos_to_cnt.keys()) - a1_n
    pos_to_cnt = {pos: new_pos_to_cnt[pos] for pos in available_positions}
    result += pos_to_cnt.get(n, 0)

print(result % P)