#include <bits/stdc++.h>
using namespace std;
const int inf_int = 1000000000;
const long long inf_ll = 100000000000000000;
void prin(vector<int>& a) {
  for (int i = 0; i < a.size(); i++) {
    cout << a[i] << " ";
  }
}
void prin_new_line(vector<int>& a) {
  for (int i = 0; i < a.size(); i++) {
    cout << a[i] << "\n";
  }
}
void prin(vector<long long>& a) {
  for (int i = 0; i < a.size(); i++) {
    cout << a[i] << " ";
  }
}
void prin_new_line(vector<long long>& a) {
  for (int i = 0; i < a.size(); i++) {
    cout << a[i] << "\n";
  }
}
int sum_vec(vector<int>& a) {
  int s = 0;
  for (int i = 0; i < a.size(); i++) {
    s += a[i];
  }
  return s;
}
int min(int a, int b, int c) { return min(a, min(b, c)); }
long long min(long long a, long long b, long long c) {
  return min(a, min(b, c));
}
int max(int a, int b, int c) { return max(a, max(b, c)); }
long long max(long long a, long long b, long long c) {
  return max(a, max(b, c));
}
double s_triangle(double x1, double y1, double x2, double y2, double x3,
                  double y3) {
  return abs(((x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1)) / 2);
}
double s_mnogou(vector<pair<double, double> >& a) {
  double res = 0;
  for (int i = 1; i < a.size(); i++) {
    res += s_triangle(a[i].first, a[i].second, a[i - 1].first, a[i - 1].second,
                      0, 0);
  }
  res += s_triangle(a[0].first, a[0].second, a[a.size() - 1].first,
                    a[a.size() - 1].second, 0, 0);
  return res;
}
int union_segnebts(vector<pair<int, int> > a) {
  int n = a.size();
  vector<pair<int, bool> > b;
  for (int i = 0; i < n; i++) {
    b.push_back({a[i].first, false});
    b.push_back({a[i].second, true});
  }
  sort(b.begin(), b.end());
  int result = 0;
  int c = 0;
  for (int i = 0; i < b.size(); i++) {
    if (i && c) {
      result += b[i].first - b[i - 1].first;
    }
    if (!b[i].second)
      c++;
    else
      c--;
  }
  return result;
}
void pok(vector<pair<int, int> >& a) {
  int n = a.size();
  vector<pair<pair<int, bool>, int> > b;
  for (int i = 0; i < n; i++) {
    b.push_back({{a[i].first, false}, i});
    b.push_back({{a[i].second, true}, i});
  }
  sort(b.begin(), b.end());
  stack<int> ind;
  vector<bool> used(n, false);
  vector<int> ans;
  for (int i = 0; i < b.size(); i++) {
    int in = b[i].second;
    if (b[i].first.second == false) {
      ind.push(in);
    } else {
      if (used[in] == false) {
        ans.push_back(b[i].first.first);
        used[in] = true;
        while (!ind.empty()) {
          used[ind.top()] = true;
          ind.pop();
        }
      } else {
        continue;
      }
    }
  }
  prin(ans);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  char a[8][8];
  long long n;
  cin >> n;
  n = n - 2;
  cout << n * n;
}
