def dp(p, a, memo):
    if p in memo.keys():
        return memo[p]
    elif p == 0 or p == 1:
        return 1
    else:
        ans = 0
        if p in a:
            ans = 0
        else:
            ans = dp(p-1, a, memo) + dp(p-2, a, memo)
        memo[p] = ans
        return ans

# input
n, m = map(int, input().split())
a = [int(input()) for i in range(m)]
memo = {}
print(dp(n, a, memo) % (10**9+7))