"use strict";

const main = arg => {

    const L = parseInt(arg.trim())

    let max_volume = 0;

    for (let i = 1; i <= L; i++) {
        for (let j = i; i + j <= L; j++) {
            for (let k = j; i + j + k <= L; k++) {
                max_volume = Math.max(max_volume, i * j * k);
            }
        }
    }

    console.log(max_volume);

}

main(requre('fs').readFileSync('/dev/stdin', 'utf8'));