#include <bits/stdc++.h>
int main() {
  int i, j = 1;
  int n;
  long long a[54324] = {0, 0, 0, 1};
  scanf("%d", &n);
  if (n == 3) {
    printf("1");
    return 0;
  } else {
    for (i = 4; i < 54324; i++) {
      a[i] = a[i - 1] + 2 * j + 1;
      j++;
      if (n == i) {
        break;
      }
    }
    printf("%I64d", a[i]);
  }
  return 0;
}
