brokenStairs = {}
memo = {}
modnum = 1000000007


def fibonacci(n):
    if n in memo:
        return memo.get(n)

    if n == 0 or n == 1:
        if n in brokenStairs:
            memo[n] = 0
        else:
            memo[n] = 1
    else:
        if n in brokenStairs:
            memo[n] = 0
            fibonacci(n - 1)
        else:
            memo[n] = (fibonacci(n - 1) + fibonacci(n - 2)) % modnum
    return memo[n]


N, M = raw_input().split(" ")
for i in range(0, int(M)):
    a = int(raw_input())
    brokenStairs[a] = True
print fibonacci(int(N)) % modnum
