Calculates the value of pi after n shots (n input).