n, m = map(int, input().split())
am = [int(input()) for _ in range(m)]
dic = {}
def dfs(i):

    global dic
    if dic.get(i):
        return dic[i]

    if i == n:
        return 1

    k = 0
    if i+1 not in am and i+1 <= n:
        k += dfs(i+1)
    if i+2 not in am and i+2 <= n:
        k += dfs(i+2)

    k %= 1000000007
    dic[i] = k
    return k

print(dfs(0))