HW8_1 Monte Carlo method