def resolve():
    n, m = map(int, input().split())
    li_broken = [int(input()) for _ in range(m)]
    dp = [0] * (n + 2)
    
    dp[n] = 1

    for i in reversed(range(n)):

        if i in li_broken:
            dp[i] = 0
            continue

        dp[i] = (dp[i+1] + dp[i+2]) % 1000000007

    print(dp[0])
    
resolve()