Multiple of 2 and N

AtCoder
IDabc102_a
Time2000ms
Memory256MB
Difficulty
You are given a positive integer $N$. Find the minimum positive integer divisible by both $2$ and $N$. ## Constraints * $1 \leq N \leq 10^9$ * All values in input are integers. ## Input Input is given from Standard Input in the following format: $N$ [samples]
Samples
Input #1
3
Output #1
6

$6$ is divisible by both $2$ and $3$. Also, there is no positive integer less than $6$ that is divisible by both $2$ and $3$. Thus, the answer is $6$.
Input #2
10
Output #2
10
Input #3
999999999
Output #3
1999999998
API Response (JSON)
{
  "problem": {
    "name": "Multiple of 2 and N",
    "description": {
      "content": "You are given a positive integer $N$. Find the minimum positive integer divisible by both $2$ and $N$.",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc102_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given a positive integer $N$. Find the minimum positive integer divisible by both $2$ and $N$.\n\n## Constraints\n\n*   $1 \\leq N \\leq 10^9$\n*   All values in input are integers.\n\n## Input\n\nInput ...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments