#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 9;
const int mod1 = 999999937;
const int inf = 2e9;
const int MAXN = 1e5 + 5;
const double eps = 1e-4;
int main() {
  long long ans = 1, k = 2, n;
  cin >> n;
  for (int i = 3; i < n; i++) {
    ans += k + 1;
    k += 2;
  }
  cout << ans;
  return 0;
}
