#include <bits/stdc++.h>

#define fst(t) std::get<0>(t)
#define snd(t) std::get<1>(t)
#define thd(t) std::get<2>(t)
#define unless(p) if(!(p))
#define until(p) while(!(p))

using ll = std::int64_t;
using P = std::tuple<int,int>;

ll N;

int main(){
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);

    std::cin >> N;

    ll res;

    if(N == 1){
        res = 0;
    }else if(N % 2 == 0){
        res = (N * N * N + 3ll * N * N + 5ll * N - 6) / 6;
    }else{
        res = (N * N * N + 3ll * N * N + 5ll * N - 3) / 6;
    }

    std::cout << res << std::endl;
}