num should denote the number of brute force calculations, not the number of monte carlo steps