Calculate PI to user input