#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    if (n < 1000) {
      long long int ans = 1;
      long long int ans_sa = 3;
      long long int ans_sa_pls = 3;
      for (int i = 0; i < n; i++) {
        ans += ans_sa;
        ans_sa += ans_sa_pls;
        ans_sa_pls++;
      }
      cout << ans << endl;
    } else {
      long long int ans = 167668501;
      long long int ans_sa = 502500;
      long long int ans_sa_pls = 997;
      for (int i = 1000; i < n; i++) {
        ans += ans_sa;
        ans_sa += ans_sa_pls;
        ans_sa_pls -= 2;
      }
      cout << ans << endl;
    }
  }
}
