#include
using namespace std;
int main() {
// your code goes here
int N;
cin >> N;
int sum = (N * (N + 1) ) / 2;
cout << sum;
return 0;
}
#include
using namespace std;
int main() {
// your code goes here
int N;
cin >> N;
int sum = (N * (N + 1) ) / 2;
cout << sum;
return 0;
}
Consider the test input:
1000000000