#include <bits/stdc++.h>
using namespace std;
long long l1[54325];
int main() {
  long long j = 3;
  l1[3] = 1;
  for (int i = 4; i <= 54321; i++) {
    l1[i] = l1[i - 1] + j;
    j += 2;
  }
  long long n;
  cin >> n;
  cout << l1[n];
}
