This page is still under construction.

Parts of this page are still being built. What you see may change.

Sum

Time limit1sMemory limit128 MB

Summary
Given an integer n, compute and print the sum of all integers from 1 to n.
Level

Easy1 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

Given an integer nn, write a program that computes the sum of all integers from 11 to nn.

Input

The first line contains an integer nn (1≤n≤100001 \le n \le 10000).

Output

Print the sum of all integers from 11 to nn.

Examples1

  1. Example 1

    Input
    3
    
    Expected output
    6