CONST = 1000000007
n, m = map(int, input().split())
a_list = [int(input()) for _ in range(m)]
index = 1
prev_p, p = 1, 1
while index < n:
    if index == 1:
        if index in a_list:
            p = 0
        pass
    elif index in a_list:
        prev_p = p
        p = 0
        if index + 1 in a_list:
            pp = 0
            break
    else:
        prev_p = p
        p = (p + pp) % CONST
    pp = prev_p
    index += 1

print((pp + p) % CONST)