#include <bits/stdc++.h>
using namespace std;
long long n, m, ans;
int main() {
  cin >> n;
  ans = 1;
  m = 3;
  for (int i = 3; i < n; i++) {
    ans += m;
    m += 2;
  }
  cout << ans;
  return 0;
}
