"use strict";

function factorial(num) {
  if (num == 1) {
    return num;
  } else {
    return num * factorial(num - 1);
  }
}
    
const getAllFactorsFor = remainder => {
    let factors = [], i;

    for (i = 2; i <= remainder; i++) {
        while ((remainder % i) === 0) {
            factors.push(i);
            remainder /= i;
        }
    }

    return factors;
}

const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0]);
    const Nf = factorial(N);
    
    const factors = getAllFactorsFor(Nf);
    const set = new Set(factors);
    
    console.log([...set].reduce((m,n)=>m*n));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));