function Main(input) {
  var nums = input.split('\n');

  console.log(nums);
  
  var keta = Math.floor(nums[0]);
  
  function product_Range(a, b) {
    var prd = a,
      i = a;
  
    while (i++ < b) {
      prd *= i;
    }
    return prd;
  }
  
  function combinations(n, r) {
    if (n == r) {
      return 1;
    } else {
      r = r < n - r ? n - r : r;
      return product_Range(r + 1, n) / product_Range(1, n - r);
    }
  }
  
  var ans = combinations(keta, keta - 3) - (keta - 3);
  
  console.log(ans);
}
Main(require('fs').readFileSync('/dev/stdin', 'utf8'));