MC simulation for pi value