#include <bits/stdc++.h>
using namespace std;
long long arr[55555];
int main() {
  arr[3] = 1;
  int x = 3;
  for (int i = 4; i < 55554; i++) {
    arr[i] = arr[i - 1] + x;
    x += 2;
  }
  int n;
  cin >> n;
  cout << arr[n];
  return 0;
}
