const main = stdin => {
  const input = stdin.trim().split('\n')
  const N = parseInt(input[0])
  for (let i = 2; ; i += 2) {
    if (i % N === 0) {
      console.log(i)
      break
    }
  }
}


// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"))
