#include <bits/stdc++.h>
const long long modulo = 123456789;
const long long oo = 1e18;
const int MAX_SIZE = 100007;
const double PI = acos(-1.0);
using namespace std;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long n;
  while (cin >> n) cout << (n - 2) * (n - 2);
  return 0;
}
