#include <iostream> using namespace std; int main() { int n; cin >> n; int total = n * (n + 1) * (2 * n + 1) / 6; cout << total << endl; return 0; }
Using your Hydro universal account