#include <bits/stdc++.h>
using namespace std;
long long n, ans = 1, in = 3;
void solve() {
  cin >> n;
  n -= 3;
  while (n-- > 0) {
    ans += in;
    in += 2;
  }
  cout << ans;
}
int main() {
  int t = 1;
  while (t--) solve();
}
