function Main (input) {
  const num = input.split(/\s/g).filter((num) => num).map(num => parseInt(num))[0];
  if (num % 2 === 0 && num > 2) return console.log('%s',num);
  if (num % 2 === 0 && num <= 2) return console.log('%s',2);
  console.log('%s',num * 2);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
