#include<bits/stdc++.h> using namespace std; int n; unsigned long long ans; int main(){ cin>>n; cout<<n*(n+1)*(n*2+1)/6; return 0; }