import java.util.*

private const val TWO = 2

fun main(args: Array<String>) {
    multipleOf2AndN()
}
fun multipleOf2AndN() {
    val n = Scanner(System.`in`).nextInt()
    val result = n * TWO / gcd(n, TWO)

    println(result)
}

private tailrec fun gcd(a: Int, b: Int): Int = if (b == 0) a else gcd(b, a % b)