Problem:


Score : 100 points

Problem Statement

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

Output

Print the minimum positive integer divisible by both 2 and N.

Sample Input 1

3

Sample 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.

Sample Input 2

10

Sample Output 2

10

Sample Input 3

999999999

Sample Output 3

1999999998



Sample input:
3


Sample output:
6

Submission status: Accepted

Solution code:
n = int(input())
print(n*2 if n%2 else n)

Submission status: Accepted

Solution code:
N = int(input())
if N%2 == 0:
  print(N)
else:
  print(2*N)

Submission status: Accepted

Solution code:
n = int(input())
print(2*n if n&1 else n)

Submission status: Accepted

Solution code:
N = int(input())
if N % 2 != 0:
    N *= 2
print(N)

Submission status: Accepted

Solution code:
def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)

def lcm(m, n):
    return m * n / gcd(m, n)

N = int(input())
print(int(lcm(2, N)))

Submission status: Accepted

Solution code:
N = int(input())

print(N if N%2==0 else N*2)

Submission status: Accepted

Solution code:
import fractions


def solve():
    n = int(input())
    return lcm(2, n)


def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


if __name__ == "__main__":
    print(solve())

Submission status: Accepted

Solution code:
N = int(input())
print(N) if N%2==0 else print(2*N)

Submission status: Accepted

Solution code:
N = int(input())
 
if N % 2 == 0:
  print(N)
else:
  print(2 * N)

Submission status: Accepted

Solution code:

N = int(input())

C = N % 2

if C==0:
  print(N)
else:
  print(N*2)

Submission status: Accepted

Solution code:
n = int(input())

print(n if n%2 == 0 else n*2)

Submission status: Accepted

Solution code:
n = int(input())
print(2*n if n % 2 else n)

Submission status: Accepted

Solution code:
def main():
    N = int(input())

    if N % 2 == 0:
        print(N)
    else:
        print(N*2)

main()

Submission status: Accepted

Solution code:
n = int(input())
if n % 2 == 1:
    print(2*n)
else:
    print(n)

Submission status: Accepted

Solution code:
import fractions
n=int(input())
print(2*n//fractions.gcd(2,n))

Submission status: Accepted

Solution code:
n = int(input())
print(n if n % 2 == 0 else 2 * n)

Submission status: Accepted

Solution code:
N = int(input())

if N % 2:
    print(2 * N)
else:
    print(N)

Submission status: Accepted

Solution code:
def test():
    n = int(input())
    if n % 2 == 0:
        print(n)
    else:
        print(2*n)


if __name__ == "__main__":
    test()

Submission status: Accepted

Solution code:
n = int(input())

print([2*n,n][n%2==0])

Submission status: Accepted

Solution code:
N=int(input())

if N%2==0:
    print(N)
else :
    print(N*2)

Submission status: Accepted

Solution code:
import math

# inputList=[]
# for i in range(6):
#     inputNum = input()
#     inputList.append(inputNum)
inputa = input().split()
# inputb = input().split()

# inputa = [int(n) for n in inputa]
# inputa.sort()

a = int(inputa[0])
# b = int(inputa[1])
# c = int(inputa[2])

# x = int(inputb[0])
# y = int(inputb[1])

if a%2 == 0:
    print(a)
else:
    print(a*2)

Submission status: Accepted

Solution code:

n = int(input())
i = n
while True:
    if i % 2 == 0 and i % n == 0:
        print(i)
        exit()
    i += n

Submission status: Accepted

Solution code:
N = int(input())

if N %2 == 0 and N>=2:
  print(N)
else:
  print(2*N)

Submission status: Accepted

Solution code:
N = int(input())
if N % 2 == 0:
    print(N)
else:
    print(2 *N)

Submission status: Accepted

Solution code:
N = int(input())

if N % 2 == 1 : N *= 2
print (N)

Submission status: Accepted

Solution code:
n = int(input())
if n % 2 == 0:
  print(n)
else:
  print(n * 2)

Submission status: Accepted

Solution code:
N = int(input())
def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return a

def lcm(a,b):
  return a*b//gcd(a,b)

print(lcm(N,2))

Submission status: Accepted

Solution code:
n = int(input());print([2*n,n][n%2==0])

Submission status: Accepted

Solution code:
N=int(input())
if N%2==0:
	print(N)
else:
	print(2*N)

Submission status: Accepted

Solution code:
# ABC102-A
# import mathにmath.gcd(python 3.5~)
import fractions    # python ~3.4
def lcm(a, b):
    return (a * b) // fractions.gcd(a, b)
N = int(input())
print(lcm(2, N))

Submission status: Accepted

Solution code:
n = int(input())

def gcd(x, y):
	while y:
		x, y = y, x % y
	return x

def lcm(x, y):
  return x * y // gcd (x, y)  
  
print(int(lcm(2,n)))

Submission status: Accepted

Solution code:
import math
x = int(input()) 
if x % 2 != 0 or x == 1:
  print(x*2)
else:
  print(math.floor(x/2*2))

Submission status: Accepted

Solution code:
N=int(input())
if N%2==0:
    print(N)
else:
    print(2*N)

Submission status: Accepted

Solution code:
a = int( input() )

if a % 2 == 0:
  print(a)
else:
  print(a*2)

Submission status: Accepted

Solution code:
#102

N = int(input())

if N % 2 == 0:
    print(N)
else:
    print(2*N)

Submission status: Accepted

Solution code:
#ABC103
n = int(input())
if n % 2 == 0:
  print(n)
else:
  print(2*n)

Submission status: Accepted

Solution code:
# coding:utf-8
from fractions import gcd
def main():
    n = int(input())
    ans = 2*n / gcd(2,n)
    print(int(ans))

if __name__ == '__main__' :
    main()

Submission status: Accepted

Solution code:
N = int(input())
print(N*2 if N%2==1 else N)

Submission status: Accepted

Solution code:
n=int(input())
print(2*n if n%2 !=0 else n)

Submission status: Accepted

Solution code:
n=int(input())

if n%2==0:
    print(n)
else:
    print(n*2)

Submission status: Accepted

Solution code:
n = int(input())
if n%2 == 1:
    print(2*n)
else:
    print(n)

Submission status: Accepted

Solution code:
N = int(input())
if N % 2:
    ans = N * 2
else:
    ans = N
print(ans)

Submission status: Accepted

Solution code:
def INT(): return int(input())

def main():
    N = INT()
    
    if N % 2 == 0:
        print(N)
    else:
        print(2*N)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
if N%2!=0:
  print(2*N)
else:
  print(N)

Submission status: Accepted

Solution code:
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac

setrecursionlimit(1000000)


def main():
	n = int(input())
	if(n%2==0):
		print(n)
	else:
		print(2*n)

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

Submission status: Accepted

Solution code:
import fractions

line = raw_input()
n = int(line)
ret = 2 * n / fractions.gcd(2, n)
print ret

Submission status: Accepted

Solution code:
n = int(input())
print ( n if n % 2 == 0 else n * 2)

Submission status: Accepted

Solution code:
N = int(raw_input())
print N if N % 2 == 0 else N * 2

Submission status: Accepted

Solution code:
x = int(input())
if x % 2 == 0:
  print(x)
else:
  print(x*2)

Submission status: Accepted

Solution code:
n = int(input())
i = 1
while True:
    if n*i % 2 == 0:
        print(n*i)
        break
    i += 1

Submission status: Accepted

Solution code:
n=int(input())
if n % 2 == 0:
    print(n)
else:
    print(n*2)

Submission status: Accepted

Solution code:
n = int(input())
#import math
#math.gcd(n, 2)
#print( n * 2 / math.gcd(n, 2))
'''
for i in range(1,(2*n)+1):
  if i %2 ==0 and i%n ==0:
    print(i)
    break
'''
if n%2 ==0:
  print(n)
else:
  print(2*n)

Submission status: Accepted

Solution code:
n = int(input())
if n%2 == 0:
    print(n)
else:
    print(n*2)

Submission status: Accepted

Solution code:
n=int(input())
if n%2 == 0:
    print(n)
elif n==1:
    print(2)
else:
    print(n*2)

Submission status: Accepted

Solution code:
n = int(input())
if n%2 == 0:
  print (n)
else:
  print(2*n)

Submission status: Accepted

Solution code:

import math
n = int(input())

if n % 2 == 0:
    n = n // 2

print(2 * n)

Submission status: Accepted

Solution code:
N = int(input())
if N % 2 == 0:
    print(N)
else:
    print(2*N)

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    if N % 2 == 0:
        print(N)
    else:
        print(N*2)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())

res = 0
if N%2 == 0:
    res = N
else:
    res = 2*N
print(res)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# input
N = int(input())

# solve & output
print(N if N % 2 == 0 else N * 2)

Submission status: Accepted

Solution code:
N = int(input())

for i in range(N, (N+1)*100, N):
    if i % 2 == 0 and i % N == 0:
        break

print(i)

Submission status: Accepted

Solution code:
N = int(input())
if N%2 ==0:
  print(N)
else:
  print(N*2)

Submission status: Accepted

Solution code:
n=int(input())
if n % 2 == 0:print(n)
else: print(n*2)

Submission status: Accepted

Solution code:
n=int(input())
if n % 2 == 0:print(n)
else: print(n*2)

Submission status: Accepted

Solution code:
a = int(input())
if a %2 == 0 :
  print(a)
else :
  print(a*2)

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    N = int(input())
    if N%2 ==0:
        print(N)
    else:
        print(N*2)
        
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
INPUT = sys.stdin.readline

def SINGLE_INT(): return int(INPUT())
def MULTIPLE_INT_LIST(): return list(map(int, INPUT().split()))
def MULTIPLE_INT_MAP(): return map(int, INPUT().split())
def SINGLE_STRING(): return INPUT()
def MULTIPLE_STRING(): return INPUT().split()

N = SINGLE_INT()

def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False

if is_integer_num(N/2):
    print(N)
else:
    print(N*2)

Submission status: Accepted

Solution code:
n = int(input())
if n % 2:
    print(2*n)
else:
    print(n)

Submission status: Accepted

Solution code:
n = int(input())

print(2*n if n%2 else n)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

N = int(input())

result = N
if N % 2 != 0:
    result = result * 2

# print(N)
print(result)

Submission status: Accepted

Solution code:
N = int(input())
print(N*2 if N % 2 else N)

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
if N % 2 == 0:
    print(N)
else:
    print(2 * N)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
if N % 2 == 0:
    print(N)
else:
    print(2 * N)

Submission status: Accepted

Solution code:
a = int(input())
if a % 2 == 0:
    print(a)
else:
    print(a * 2)

Submission status: Accepted

Solution code:
N = int(input())
print(2 * N if N & 1 else N)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    n = II()
    if n % 2:
        print(2 * n)
    else:
        print(n)
    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

Submission status: Accepted

Solution code:
n = int(input())

def function(x):
    if x % 2 != 0:
        return x
    return x // 2

print(function(n) * 2)

Submission status: Accepted

Solution code:
N = int(input())

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

"""aとbの最小公倍数"""
def lcm(a, b):
    return a*b//gcd(a, b)

print(lcm(2, N))

Submission status: Accepted

Solution code:
n = int(input()); print(n) if n%2 == 0 else print(n * 2)

Submission status: Accepted

Solution code:
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    n = int(input())

    print(n if n % 2 == 0 else 2 * n)

Submission status: Accepted

Solution code:
n = int(input())
print((n%2+1)*n)

Submission status: Accepted

Solution code:
n = int(input())
print(n * 2) if n % 2 == 1 else print(n)

Submission status: Accepted

Solution code:
a = int(input())

if a % 2 == 0:
  print(a)
else:
  print(a * 2)

Submission status: Accepted

Solution code:

N = int(input())

if (N % 2) == 0:
    print(N)
else:
    print(N * 2)

Submission status: Accepted

Solution code:
n = int(input())
if(n % 2 == 0):
    print(n)
else:
    print(n*2)

Submission status: Accepted

Solution code:
#a, b, c = map(int,input().split())
#ls = list(map(int,input().split()))
r = int(input())
#s = input()

if r%2 == 0:
  print(r)
else:
  print(r*2)

Submission status: Accepted

Solution code:
n = int(input())
print(n+n*(n%2))

Submission status: Accepted

Solution code:
# Nは2とほにゃららを2以外の因数にもつので偶数ならnで奇数なら2*n

n = int(input())
if n % 2 == 1:
    print(2 * n)
else:
    print(n)

Submission status: Accepted

Solution code:
a=int(input())
print(a*2 if a%2 else a)

Submission status: Accepted

Solution code:
a = int(input())

if a%2==0:
  print(a)
else:
  print(2*a)

Submission status: Accepted

Solution code:
N=int(input())

def gcd(N,two=2):
    large=max(N,two)
    small=min(N,two)
    r = large % small
    while r != 0:
        large = small
        small = r
        r = large % small
    return small

print(int(N*2/gcd(N)))

Submission status: Accepted

Solution code:
def gcd(a,b):
    while b:
        a,b = b,a%b
    return a
def lcm(a,b):
    return a*b//gcd(a,b)

n = int(input())
print(lcm(2,n))

Submission status: Accepted

Solution code:
import fractions
A=int(input())
print(int((2*A)/fractions.gcd(2,A)))

Submission status: Accepted

Solution code:
x=int(input())
if x%2==0:
    print(x)
else:
    print(x*2)

Submission status: Accepted

Solution code:
x=int(input())

res=x*2

if x%2==0:
	res=x

print(res)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y)

def lcm(x, y):
    return (x * y) // gcd(x, y)

num = int(input())

print(lcm(2, num))

Submission status: Accepted

Solution code:
#109
N = int(input())
ans=(1+(N%2))*N
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
print(N if N%2==0 and N/N else int(N)*2)

Submission status: Accepted

Solution code:
n = int(input())

if n % 2:
    print(n * 2)
else:
    print(n)

Submission status: Accepted

Solution code:
N = int(input())

if N%2:
    print(N*2)
else:
    print(N)

Submission status: Accepted

Solution code:
N =int(input())
if N%2:
    print(2*N)
else:
    print(N)

Submission status: Accepted

Solution code:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

N = n()
if N % 2 == 0:
    print(N)
else:
    print(N*2)

Submission status: Accepted

Solution code:
N = int(input())
if N%2 == 0:
    print(N)
else:
    print(2*N)

Submission status: Accepted

Solution code:
n = int(input())
i = 1
while True:
    if (n * i) % 2 == 0:
        print(n * i)
        break
    i += 1

Submission status: Accepted

Solution code:

N = int(input())

if N % 2 == 0:
    print (N)

else:
    print (N * 2)

Submission status: Accepted

Solution code:
n = int(input())
print(2*n if n%2==1 else n)

Submission status: Accepted

Solution code:
x=int(input())
if x%2==0:
  print(x)
else:print(x*2)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys

input = sys.stdin.readline

def main():
    n = int(input())
    print(n if n % 2 == 0 else n * 2)

main()

Submission status: Accepted

Solution code:
N=int(input());print(N*(N%2+1))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int):
    if N % 2 == 0:
        print(N)
    else:
        print(N*2)
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
for i in range(n, 10 ** 10, n):
  if i%2 == 0 and i%n == 0:
    print(i)
    break

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

N, = map(int, input().split())

if N % 2 == 0:
    print(N)
else:
    print(N * 2)

Submission status: Accepted

Solution code:
n = int(input())

if n % 2:
  print(n * 2)
else:
  print(n)

Submission status: Accepted

Solution code:
n = int(input())

if n % 2 == 1:
  n *= 2
print(n)

Submission status: Accepted

Solution code:
n = int(input())
if n%2: print(n*2)
else: print(n)

Submission status: Accepted

Solution code:
N = int(input())
print(N<<1 if N&1 else N)

Submission status: Accepted

Solution code:
def abc():
    N = int(input().rstrip())
    print(N * 2 if N % 2 else N)


abc()

Submission status: Accepted

Solution code:
N = int(input())

if N % 2 == 1:
    print(N * 2)
else:
    print(N)

Submission status: Accepted

Solution code:
n = int(input())

if n % 2 == 0:
  print(str(n))
else:
  print(str(n*2))

Submission status: Accepted

Solution code:
N = int(input())

mod = N % 2

if mod == 0:
	print(N)
else:
	print(N*2)

Submission status: Accepted

Solution code:
N = int(input())
print(N) if N % 2 == 0 else print(N*2)

Submission status: Accepted

Solution code:
N = int(input())

if N % 2 == 0:
    print(N)
else :
    print(N * 2)

Submission status: Accepted

Solution code:
n = int(input())
if n % 2 == 0 :
        print(n)
else :
        print(n * 2)

Submission status: Accepted

Solution code:
n = int(input())

if n % 2 ==0:
    print(n)
else :
    print(n*2)

Submission status: Accepted

Solution code:
n = int(input())
if n % 2 == 1:
  print(n*2)
else:
  print(n)

#3:30

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import numpy as np

def main():
	N = int(input())
	
	ans = lcm(2, N)
	
	print(ans)
	
def gcd(a, b):
	if a > b:
		a, b = b, a
		
	while a > 0:
		a, b = b % a, a
	return b
	
def lcm(a, b):
	g = gcd(a, b)
	return a // g * b
	
if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
N = int(input())

if(N%2==0):
    print(N)
else:
    print(N*2)

Submission status: Accepted

Solution code:
n = int(input())

if n%2 ==0:
    print(n)
else:
    print(2*n)

Submission status: Accepted

Solution code:
N = int(input())

if N%2 == 0:
    print (N)
else:
    print (2* N)

Submission status: Accepted

Solution code:
n = int(input())
print(2*n-((n%2 == 0)*n))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

n = int(input())

if n%2 == 0:
    print(n)
else:
    print(n*2)

Submission status: Accepted

Solution code:
a = int(input())
i = 0

while(True):
    i += a
    if i % 2 ==0:
        print(i) 
        break

Submission status: Accepted

Solution code:
n= int(input())
if n %2 == 0:
  if n %n == 0:
    print(n)
  else:
    print(n*2)
else:
  print(n*2)

Submission status: Accepted

Solution code:
N=int(input())
print(N*(N%2+1))

Submission status: Accepted

Solution code:
N = int(input())
if N % 2 == 0:
  print(N)
else:
  print(N*2)

Submission status: Accepted

Solution code:
N = int(raw_input())
if N%2 == 0: print N
else: print N*2

Submission status: Accepted

Solution code:
def gcd(a, b):
  if b > a:
    a, b = b, a
  while b != 0:
    a, b = b, a % b
  return a
 
n = int(input())
ans = n * 2 // gcd(n, 2)
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
ans = n
if n % 2 != 0:
    ans*=2
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int):
    print( N if N % 2 == 0 else 2*N )


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
if n%2:
    print(n*2)
else:
    print(n)

Submission status: Accepted

Solution code:
n = int(input())

ans = n

while True:
    if ans%n == 0 and ans%2 == 0:
        print(ans)
        break
    ans += n

Submission status: Accepted

Solution code:
n=int(input())
if n%2==0:
  print(n)
else:
  print(n*2)

Submission status: Accepted

Solution code:
import statistics

def main():
    num = int(input())
    if num % 2 == 0:
        print(num)
    else:
        print(2 * num)



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import fractions
N = int(input())

print(2*N if N%2==1 else N)

Submission status: Accepted

Solution code:
a = int(input())

if a%2 == 0 :
    print(a)
else :
    print(a*2)

Submission status: Accepted

Solution code:
N = int(input())
if (N % 2 == 0):
  print(N)
else:
  print(2 * N)

Submission status: Accepted

Solution code:
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    n = f()[0]
    if n&1:
        print(2*n)
    else:
        print(n)

solve()

Submission status: Accepted

Solution code:
import fractions

n = int(input())

print((2 * n) // fractions.gcd(2, n))

Submission status: Accepted

Solution code:
a = int(input())
if a % 2 == 0:
  print(a)
else:
  print(2 * a)

Submission status: Accepted

Solution code:
from sys import stdin

N = int(stdin.readline().rstrip())

if N % 2 == 0:
    print(N)
else:
    print(2 * N)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int):
    ret = N
    if N % 2 == 1:
        ret = N * 2
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
###############################################################################

from sys import stdout
from bisect import bisect_left as binl
from copy import copy, deepcopy
from collections import defaultdict


mod = 1


def intin():
    input_tuple = input().split()
    if len(input_tuple) <= 1:
        return int(input_tuple[0])
    return tuple(map(int, input_tuple))


def intina():
    return [int(i) for i in input().split()]


def intinl(count):
    return [intin() for _ in range(count)]


def modadd(x, y):
    global mod
    return (x + y) % mod


def modmlt(x, y):
    global mod
    return (x * y) % mod


def lcm(x, y):
    while y != 0:
        z = x % y
        x = y
        y = z
    return x


def combination(x, y):
    assert(x >= y)

    if y > x // 2:
        y = x - y

    ret = 1

    for i in range(0, y):
        j = x - i
        i = i + 1

        ret = ret * j
        ret = ret // i

    return ret


def get_divisors(x):
    retlist = []
    for i in range(1, int(x**0.5) + 3):
        if x % i == 0:
            retlist.append(i)
            retlist.append(x // i)
    return retlist


def get_factors(x):
    retlist = []
    for i in range(2, int(x**0.5) + 3):
        while x % i == 0:
            retlist.append(i)
            x = x // i
    retlist.append(x)
    return retlist


def make_linklist(xylist):
    linklist = {}
    for a, b in xylist:
        linklist.setdefault(a, [])
        linklist.setdefault(b, [])
        linklist[a].append(b)
        linklist[b].append(a)
    return linklist


def calc_longest_distance(linklist, v=1):
    distance_list = {}
    distance_count = 0
    distance = 0
    vlist_previous = []
    vlist = [v]
    nodecount = len(linklist)

    while distance_count < nodecount:
        vlist_next = []
        for v in vlist:
            distance_list[v] = distance
            distance_count += 1
            vlist_next.extend(linklist[v])
        distance += 1
        vlist_to_del = vlist_previous
        vlist_previous = vlist
        vlist = list(set(vlist_next) - set(vlist_to_del))

    max_distance = -1
    max_v = None
    for v, distance in distance_list.items():
        if distance > max_distance:
            max_distance = distance
            max_v = v

    return (max_distance, max_v)


def calc_tree_diameter(linklist, v=1):
    _, u = calc_longest_distance(linklist, v)
    distance, _ = calc_longest_distance(linklist, u)
    return distance


###############################################################################


def main():
    n = intin()

    if n % 2:
        print(n * 2)
    else:
        print(n)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
if n %2 == 0:
    print(n)
else:
    print(n*2)

Submission status: Accepted

Solution code:
a = int(input())
if(a % 2 == 0):
  print(a)
else:
  print(a*2)

Submission status: Accepted

Solution code:
a = int(input())

if (a < 2):
	print(2)

elif (a == 2):
  	print(2)

elif (a % 2 == 0):
  	print(a)
    
else:
  	print(a * 2)

Submission status: Accepted

Solution code:
a = int(input())

if a%2 == 0:
  print(a)
else:
  print(2*a)

Submission status: Accepted

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}

n=int(input())
if n%2==1:
    print(2*n)
else:
    print(n)

Submission status: Accepted

Solution code:
N = int(input())
if N%2==0:
	print(N)
else:
	print(N*2)

Submission status: Accepted

Solution code:
N=int(input())
if N % 2 == 0:
  print(N)
else:
  print(N*2)

Submission status: Accepted

Solution code:
n=int(input())
print(n if n % 2 == 0 else n * 2)

Submission status: Accepted

Solution code:
n = int(input())
print(n + n * (n % 2))

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from heapq import heappop, heappush, heapify, heappushpop
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = INT()

if N%2 == 0:
	print(N)
else:
	print(N*2)