

def down(current_step):
    if current_step < 0 or current_step in dangerous_step:
        return 0
    if current_step == 0:
        return 1
    if current_step == 1:
        return memo[current_step-1]
    if current_step in memo:
        return memo[current_step]
    memo[current_step] = (down(current_step - 1) +
                          down(current_step - 2)) % ((1e+9) + 7)
    return memo[current_step]

n, m = [int(x) for x in input().split()]
memo = dict({0:1})
dangerous_step = {int(input()): 0 for x in range(m)}
print(int(down(n)))
