시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 27309 19724 17777 73.586%

문제

n이 주어졌을 때, 1부터 n까지 합을 구하는 프로그램을 작성하시오.

입력

첫째 줄에 n (1 ≤ n ≤ 10,000)이 주어진다.

출력

1부터 n까지 합을 출력한다.

예제 입력 1

3

예제 출력 1

6
W3sicHJvYmxlbV9pZCI6IjgzOTMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWQ1NjkiLCJkZXNjcmlwdGlvbiI6IjxwPm5cdWM3NzQgXHVjOGZjXHVjNWI0XHVjODRjXHVjNzQ0IFx1YjU0YywgMVx1YmQ4MFx1ZDEzMCBuXHVhZTRjXHVjOWMwIFx1ZDU2OVx1Yzc0NCBcdWFkNmNcdWQ1NThcdWIyOTQgXHVkNTA0XHViODVjXHVhZGY4XHViN2E4XHVjNzQ0IFx1Yzc5MVx1YzEzMVx1ZDU1OFx1YzJkY1x1YzYyNC48XC9wPlxyXG4iLCJpbnB1dCI6IjxwPlx1Y2NhYlx1YzlmOCBcdWM5MDRcdWM1ZDAgbiAoMSAmbGU7IG4gJmxlOyAxMCwwMDApXHVjNzc0IFx1YzhmY1x1YzViNFx1YzljNFx1YjJlNC48XC9wPlxyXG4iLCJvdXRwdXQiOiI8cD4xXHViZDgwXHVkMTMwIG5cdWFlNGNcdWM5YzAgXHVkNTY5XHVjNzQ0IFx1Y2Q5Y1x1YjgyNVx1ZDU1Y1x1YjJlNC48XC9wPlxyXG4iLCJoaW50IjoiIiwib3JpZ2luYWwiOiIwIiwicHJvYmxlbV9sYW5nX2NvZGUiOiJcdWQ1NWNcdWFkNmRcdWM1YjQifSx7InByb2JsZW1faWQiOiI4MzkzIiwicHJvYmxlbV9sYW5nIjoiMSIsInRpdGxlIjoiU3VtIiwiZGVzY3JpcHRpb24iOiI8cD5Kb2huIGdvdCBhIGJhZCBtYXJrIGluIG1hdGguIFRoZSB0ZWFjaGVyIGdhdmUgaGltIGFub3RoZXIgdGF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