Sum from 1 to N
Print .
A loop works for small , but can you find the formula that works instantly for huge ?
Input
A single integer .
Output
The sum.
Constraints
Sample 1
Input
10
Output
55
Sample 2
Input
1
Output
1
Print .
A loop works for small , but can you find the formula that works instantly for huge ?
A single integer .
The sum.
Input
10
Output
55
Input
1
Output
1