#include int main(){ unsigned long long n; std::cin >> n; unsigned long long ans = n * (n + 1) / 2; unsigned long long dummy; if (__builtin_mul_overflow(n, n + 1, &dummy)){ ans += (1ULL << 63); } std::cout << ans << std::endl; }