Calculate montecarlopi