// #define DEBUG_ON #pragma GCC optimize("Ofast") #include #define timer_start() \ chrono::system_clock::time_point start, end; \ start = chrono::system_clock::now(); #define timer_wrap() \ end = chrono::system_clock::now(); \ double time = static_cast( \ chrono::duration_cast(end - start).count() / \ 1000.0); \ printf("time %lf[ms]\n", time); \ start = end; #define optimize_cin() \ cin.tie(0); \ ios::sync_with_stdio(false) using namespace std; using ll = long long; #define INF 1000000000 // 10^9 template bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } int main() { // input int t; cin >> t; #ifdef DEBUG_ON timer_start(); #endif int sum; for (int i = 1; i <= t; i++) { sum += i; } cout << sum << endl; #ifdef DEBUG_ON timer_wrap(); #endif return 0; }