def acinput():
    return list(map(int, input().split(" ")))


N, M = acinput()
a = [0]*(N+100)
for i in range(M):
    a[int(input())] = 1


Mod = 1000000007


def solve(x):
    global dp, M
    if dp[x] >= 0:
        return dp[x]

    if x < 0:
        return 0

    res = 0
    zeroflg = True
    try:
        if x-2 >= 0 and a[x-2] != 1:
            res += solve(x-2) % Mod
            zeroflg = False
    except:
        pass
    try:
        if x-1 >= 0 and a[x-1] != 1:
            res += solve(x-1) % Mod
            zeroflg = False
    except:
        pass

    if zeroflg:
        return 0
    dp[x] = res
    return res


dp = [-1]*(N+10)
dp[0] = 1
dp[1] = 1

print(solve(N) % Mod)