to calculate the value of pi by Monte Carlo method.