import java.util.Scanner;

/**
 * Calculates the sum of the first k positive integers for a user-specified value of k. 
 *
 * @author Drue Coles
 */
public class Summer2 {

    public static void main(String[] args) {
        
        System.out.print("Enter a positive integer: ");
        int n = new Scanner(System.in).nextInt();

        int sum = 0;
        for (int numberToAdd = 1; numberToAdd <= n; numberToAdd++) {
            sum += numberToAdd;
        }

        System.out.printf("1 + 2 + 3 + ... + %d = %d %n", n, sum);
    }
}