def main():
    tmp = list(map(int, input().split(" ")))
    n = tmp[0]
    m = tmp[1]

    a = []
    for _ in range(m):
        a.append(int(input()))

    dp = [0 for _ in range(n+1)]
    dp[n] = 1
    dp[n-1] = 1

    for i in reversed(range(0, n-1)):
        if i in a:
            dp[i] = 0
        else:
            dp[i] = dp[i+1] + dp[i + 2]
    print(dp[0] % 1000000007)

main()