#include <bits/stdc++.h>
using namespace std;
inline void ip(long long &x) {
  register long long c = getchar();
  x = 0;
  for (; ((c < 48 || c > 57)); c = getchar())
    ;
  for (; c > 47 && c < 58; c = getchar()) {
    x = (x << 1) + (x << 3) + c - 48;
  }
}
int main() {
  long long n, x;
  cin >> n;
  x = n - 3 + 1;
  cout << x * x;
}
