Calculation of Pi Using the Monte Carlo Method