Markov chain/Metropolis calculation of pi