// ASH336Sum1.java // Andrew Hoffmann

import java.util.Scanner;

public class ASH336Sum1
{
	public static void main(String[] args)
		{
		int total= 0, number = 0;

		// Create new scanner keyboard
		Scanner keyboard = new Scanner(System.in);

		// Inputs the number
		System.out.println("Pick a positive number that is not zero?");
		number = keyboard.nextInt();
		System.out.println("");
        // Get numbers for 0 to input value
		for(int x=0; x<=number; x++)
		{
			// Adds all of the number together under the input value
		    total = total + x;
		}
        // Output the sum of the numbers under the input value
        System.out.println("********************************************");
        System.out.println("The sum from 1 to "+ number + " is " + total);
        System.out.println("********************************************");
		}
}