Home
Users
Problems
Contests
Posts
Submissions
FAQ
❤️
Donate
Login
Register
|
Matcom Online Grader
View on GitHub
Join our community
The 5th Cuban Programming League (Warmup)
Ended (Frozen)
Overview
Problems
Standing
Submissions
Submit
Clarifications
A - An easy task II
Languages:
C++, Java, Python, Kotlin
Time & Memory limits:
(details)
All submissions
Accepted submissions
Submit
Fito is doing Math homework again. As usual, he would like to write a program that computes the answer automatically. He knows that the teacher might ask the students to solve thousands of them. Since Fito is new to programming, he needs your help! Given a positive integer $N$, find the minimum positive integer divisible by both $2$ and $N$ .
Input
The first line of input contains the integer $N$ $(1 \leq N \leq 10^9)$.
Output
Print the minimum positive integer divisible by both $2$ and $N$ .
Sample test(s)
Input
Copy
3
--- Showing first 30 lines (click "Copy" to get full content) ---
Output
Copy
6
--- Showing first 30 lines (click "Copy" to get full content) ---
Input
Copy
10
--- Showing first 30 lines (click "Copy" to get full content) ---
Output
Copy
10
--- Showing first 30 lines (click "Copy" to get full content) ---
Input
Copy
999999999
--- Showing first 30 lines (click "Copy" to get full content) ---
Output
Copy
1999999998
--- Showing first 30 lines (click "Copy" to get full content) ---
Notes
In the first case, **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**.