#include <iostream>
using namespace std;
int main() {
long int n;
cin >> n;
long int result;
result = n*(n + 1)*(2*n + 1)/6;
cout << result;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7Cglsb25nIGludCBuOwoJY2luID4+IG47Cglsb25nIGludCByZXN1bHQ7CglyZXN1bHQgPSBuKihuICsgMSkqKDIqbiArIDEpLzY7Cgljb3V0IDw8IHJlc3VsdDsKCXJldHVybiAwOwp9