n, m = map(int, input().split())
a1_n = [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:
                result = (result + c) % P
                break
            elif new_pos < n and new_pos not in a1_n:
                new_pos_to_cnt[new_pos] = (new_pos_to_cnt.get(new_pos, 0) + c) % P
    pos_to_cnt = new_pos_to_cnt

print(result)