Entropy Formula for Topological Markov Chains