def typical_stairs():
    n, m = map(int, input().split())
    dangerous = list(int(input()) for _ in range(m))
    mod = 1000000007
    dp = [0] * (n + 1)
    dp[0] = 1
    if not dangerous[0] == 1:
        dp[1] = 1
    for i in range(2, n + 1):
        if i not in dangerous:
            dp[i] = dp[i - 2] + dp[i - 1]
    print(dp[-1] % mod)


if __name__ == '__main__':
    typical_stairs()
