Calculate integral by Monte Carlo method