Estimating the value of pi using Monte Carlo