#include <bits/stdc++.h>
using namespace std;
int n;
long long sum[100005];
int main() {
  scanf("%d", &n);
  long long awal = 1;
  long long pivot = 3;
  sum[3] = 1;
  for (int i = 4; i <= 100000; i++) {
    sum[i] = awal + pivot;
    awal = sum[i];
    pivot += 2;
  }
  printf("%lld\n", sum[n]);
  return 0;
}
