結果 : sum of first n natural numbers java code