// sum.cpp : Defines the entry point for the console application.
//

#include <stdio.h>

int main(int argc, char* argv[])
{
	int sum = 0;
	int i, N;
	
	scanf("%d", &N);

	//通过while循环求1到N的和(do...while及for?)
	i = 1;
	while( i<=N )
	{
		sum = sum + i;
		i++;
	}

	printf("The sum from 1 to %d is %d.\n", N, sum);
	
	return 0;
}
