Back to tasks
Half or double
BeginnerPython for kids 路 Lesson 22: if and else - one of two
Problem Statement
Read a number n. If it is even, print half of it, and if it is odd - twice the number.
Input Format
One whole number n (-1000 <= n <= 1000).
Output Format
One number - the result.
Examples
Example 1
Input
10
Output
5
Example 2
Input
7
Output
14