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