#include <bits/stdc++.h>
const int inf = 1e+9;
using namespace std;
long long dp[100010];
int main() {
  dp[3] = 1;
  int p = 3;
  for (int i = 4; i <= 60000; i++) {
    dp[i] = dp[i - 1] + p;
    p += 2;
  }
  int n;
  cin >> n;
  cout << dp[n] << endl;
  return 0;
}
