/* -*- coding: utf-8 -*- * * 71.cc: No.71 そろばん - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ /* typedef */ typedef long long ll; /* global variables */ /* subroutines */ /* main */ int main() { int n; cin >> n; ll maxsum = 0; for (int i = 1, j = n - 1; i < n; i++, j--) { ll sum = (ll)(i + 1) * j + i; if (maxsum < sum) maxsum = sum; } printf("%lld\n", maxsum); return 0; }