def get_num_path(index):
    if index < 0:
        return 0
    if num_path[index] != -1:
        return num_path[index]
    ans = 0
    if can_step[index - 1]:
        ans += get_num_path(index - 1)
    if can_step[index - 2]:
        ans += get_num_path(index - 2)
    num_path[index] = ans
    return ans


n, m = input().split()
n = int(n)
m = int(m)
am = [int(input()) for _ in range(m)]

am = [int(a) for a in am]
num_path = [-1] * (n + 1)
num_path[0] = 1
num_path[1] = 1
can_step = [False if i in am else True for i in range(n+1)]

ans = get_num_path(n)
ans %= 1000000007
print(ans)
