import java.util.Scanner; // program uses class Scanner

public class BPIH4E1A
{
     // main method begins execution of Java application
     public static void main( String args[] )
     {
         // create Scanner to obtain input from command window
        Scanner input = new Scanner( System.in );            
        int number1; // first number to add   
         
        int sum=0; // sum of number1 and number2
        System.out.print( "Enter the number: " ); // prompt
        number1 = input.nextInt(); // read first number from user
        int i=1;
        do
        { sum += i; // add numbers
          i++;
        }  while(i<=number1);
        System.out.printf( "Sum is %d\n", sum ); // display sum
     } // end method main

} // end class BPIH4E1
