Computation of Pi using a Montecarlo Method