class Main { public static void main(String[] args) { int n = Integer.parseInt(args[0]); String outStr = String.valueOf(sum(n)); System.out.println(outStr); } public static int sum(int n) { int result = (1 + n) * n / 2; return result; } }