#include <bits/stdc++.h>
using namespace std;
int pr[500000 + 1], prnum[5000000 + 1];
int sieve() {
  int i, j;
  for (i = 1; i <= 5000000; i++) prnum[i] = i + 1;
  for (i = 1; i <= 5000000; i++)
    if (prnum[i] != -1)
      for (j = 2 * prnum[i] - 1; j <= 5000000; j += prnum[i]) prnum[j] = -1;
  j = 0;
  for (i = 1; i <= 5000000; i++)
    if (prnum[i] != -1) pr[++j] = prnum[i];
  return j;
}
bool prime(long long n) {
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
bool myComparison(const pair<int, int> &a, const pair<int, int> &b) {
  return a.second > b.second;
}
int main() {
  long long n;
  cin >> n;
  cout << (n - 2) * (n - 2);
}
