#include <bits/stdc++.h>
using namespace std;
long long dp[54400];
long long sum[54400];
void init() {
  memset(dp, 0, sizeof(dp));
  dp[4] = 3;
  for (int i = 5; i <= 54400; i++) dp[i] = dp[i - 1] + 2;
  memset(sum, 0, sizeof(sum));
  sum[3] = 1;
  for (int i = 4; i <= 54400; i++) sum[i] = sum[i - 1] + dp[i];
}
int main() {
  int n;
  init();
  while (~scanf("%d", &n)) {
    printf("%lld\n", sum[n]);
  }
}
