calculate with more than two numbers