#include <bits/stdc++.h>
using namespace std;
unsigned long long ans[54325];
void solve() {
  ans[3] = 1;
  unsigned long long temp = 3;
  for (int i = 4; i <= 54325; i++) {
    ans[i] = ans[i - 1] + temp;
    temp += 2;
  }
}
int main() {
  solve();
  int n;
  while (~scanf("%d", &n)) {
    printf("%lld\n", ans[n]);
  }
  return 0;
}
