#include <bits/stdc++.h>
using namespace std;
FILE *file;
bool myfnc(pair<int, int> a, pair<int, int> b) { return a.second < b.second; }
vector<vector<int> > P(101);
void fP(int n = 101) {
  P[0].push_back(1);
  P[1].push_back(1);
  P[1].push_back(1);
  for (int i = 2; i < 101; i++) {
    P[i].push_back(1);
    for (int j = 0; j < P[i - 1].size() - 1; j++) {
      P[i].push_back(P[i - 1][j] + P[i - 1][j + 1]);
    }
    P[i].push_back(1);
  }
}
int gcd(int a, int b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
int main() {
  long long n;
  cin >> n;
  cout << (n - 2) * (n - 2);
  return 0;
}
