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:
from collections import Counter
from collections import deque
from functools import reduce
from pprint import pprint
# import statistics
import bisect
import copy
import fractions
import math
import random
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def MI(): return map(int, sys.stdin.readline().split())
def II(): return int(sys.stdin.readline())
def IS(): return input()
def C(x): return Counter(x)
def GCD_LIST(numbers):
    return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers):
    return reduce(LCM, numbers)
def LCM(m, n):
    return (m * n // fractions.gcd(m, n))
def unite(x, y):
    # それぞれのノードの根を求める
    x = root(x)
    y = root(y)
    if x == y:
        return
    # node[x]の根をyに変更する
    node[x] = y
def same(x,y): return bool(root(x) == root(y))
def root(x):
    if node[x] == x:  # xが根の場合
        return x
    else:
        node[x] = root(node[x])  # 経路圧縮
        return node[x]
def dfs(v):
    # ノードに訪れた
    visited[v] = True
    for v2 in range(n):
        if graph[v][v2] == False:  # そもそもvとv2が辺でつながっていない
            continue
        if visited[v2] == True:  # もう見た
            continue
        dfs(v2)

print(LCM(2, II()))

Submission status: Accepted

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

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

print(lcm(n, 2))

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())
print(2*n) if n%2 != 0 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:
    ans = n*2
else:
    ans = n
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
import fractions #ver3.5以降はimoport math
print(int(2*n/fractions.gcd(2,n))) #ver3.5以降はmath.gcd

Submission status: Accepted

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

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:
    print(2*N)
else:
    print(N)

Submission status: Accepted

Solution code:
d=int(input())

if d%2==0 :
  print(int(d))
else:
  print(int(d*2))

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

n = int(input())

if(n % 2 == 0):
    print(n)
else:
    t = 1
    while True:
        t += 1
        n = n*t
        if(n % 2 == 0):
            print(n)
            break;

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())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
from math import *
from itertools import *
from collections import *
from functools import *
try:
    from math import gcd
except Exception:
    from fractions import gcd


def solve(N: int):
    g = gcd(N, 2)
    return N * 2 // g


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
    result = solve(N)
    print(result)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())

if(n % 2 == 0):
    print(n)
else:
    t = 1
    while True:
        t += 1
        n = n*t
        if(n % 2 == 0):
            print(n)
            break;

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:
import sys
input = sys.stdin.readline

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*2)
else:
  print(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==0:
    ans=n
else:
    ans=n*2
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
if n % 2 > 0:
    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:
a=int(input())
print(a if a%2==0 else 2*a)

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())
print(a if a%2 == 0 else 2*a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import functools

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


def inl():
    return list(map(int, input().split()))


def inlf():
    return list(map(float, input().split()))


def inls():
    return input().split()


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper


n = inp()
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())
print(n * 2 if n&1 else n)

Submission status: Accepted

Solution code:
# ABC102A - Multiple of 2 and N
n = int(input())
print(n if n % 2 == 0 else 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:
R = int(input())
if R % 2 == 0 and R % R == 0:
    print(R)
else:
    print(2*R)

Submission status: Accepted

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

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

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

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 1 <= N <= 10 ** 9:
    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:
a=int(input())
if 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(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:
# -*- coding: utf-8 -*-

n = int(input())

# for i in range(1, 10**9):
#     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:
def main():
	N = int(input())
	print(N if N % 2 == 0 else 2*N)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = int(input())

print(a) if a%2 == 0 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:
N = int(input())
if(N%2 == 0):
  print(N)
else:
  print(2*N)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

print(N + N * (N % 2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python

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


if __name__ == '__main__':
    main()

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 if N%2 else 0))

Submission status: Accepted

Solution code:
N = int(input())
import fractions as f
g = f.gcd(2,N)
print(int(2*N/g))

Submission status: Accepted

Solution code:
input_num = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())

# for i in range(1, 10**9):
#     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())
print (N if N%2==0 else N*2)

Submission status: Accepted

Solution code:
N = input()
N = int(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(N*2)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


def solve(N: int):
    if N & 1:
        print(N << 1)
    else:
        print(N)
    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:
N = int(input())
print((N*2) if N%2 else N)

Submission status: Accepted

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

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 % n == 0 and n % 2 == 0:
    print(n)
else:
    print(n * 2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

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(2*n)

Submission status: Accepted

Solution code:
n=int(input());print(n*-~(n&1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k=int(input())
n=k
while True:
    if n%2==0 and n%k==0:
        break
    n+=k
print(n)

Submission status: Accepted

Solution code:
N = int(input())
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(n*2)

Submission status: Accepted

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

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:
N=int(input())
ans=N if N%2==0 else 2*N
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input());print([a*2,a][a%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:
N = int(input())
if N % 2 == 0:
    print(N)
else:
    print(N*2)

Submission status: Accepted

Solution code:
n=int(input())
if n%2:
  print(n+n)
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*2)
else:
  print(n)

Submission status: Accepted

Solution code:
from sys import stdin
N=int(stdin.readline().rstrip())
if N%2==0:
  print(N)
else:
  print(N*2)

Submission status: Accepted

Solution code:
# /user/bin/python
# -*- coding: utf-8 -*-
import sys


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from fractions import gcd
N = int(input())
print(2*N//gcd(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:
def solve(string):
    n = int(string)
    return str(n) if n % 2 == 0 else str(2 * n)


if __name__ == '__main__':
    print(solve(input()))

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):
  G = gcd(a,b)
  ans = (a*b)//G
  return ans

print(lcm(2,N))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def multiple_of_2_and_N(N: int) -> int:
    return N if N % 2 == 0 else 2*N


if __name__ == "__main__":
    N = int(input())
    ans = multiple_of_2_and_N(N)
    print(ans)

Submission status: Accepted

Solution code:
N = int(input())

def gcd(m, n):
  while n:
    m, n = n, m%n
  return m

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

print(lcm(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:
a=int(input())
print(a*(2**(a%2)))

Submission status: Accepted

Solution code:
# coding: utf-8
N = int(input())
print([N * 2, N][N % 2 == 0])

Submission status: Accepted

Solution code:
def multiple_of_2_and_N(N: int)->int:
    return N if N % 2 == 0 else 2 * N


if __name__ == "__main__":
    N = int(input())
    ans = multiple_of_2_and_N(N)
    print(ans)

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())
#A1,A2,A3=map(int,input().split())
if N%2==0:
    print(N)
else:
    print(N*2)

Submission status: Accepted

Solution code:
n = int(input())

m = 10000000000000000

for i in range(n,m,n):
	if i % 2 == 0:
		print(i)
		break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
def gcd(m, n):
  while n:
    m, n = n, m%n
  return m
def lcm(m, n):
  return (m * n) // gcd(m, n)
print(lcm(N,2))

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())
if N % 2 != 0:
    N *= 2
print(N)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
def rgcd(m, n):
    if n == 0:
        return m

    return rgcd(n, m % n)


N = int(input())

if N >= 2:
    print(N * 2 // rgcd(N, 2))
else:
    print(2 * N // rgcd(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:N*=2
print(N)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc102/tasks/abc102_a
n = int(input())
print(n) if n % 2 == 0 else print(n * 2)

Submission status: Accepted

Solution code:
from fractions import gcd
n=int(input())
print((2*n)//gcd(2, 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())

if N % 2 == 0:
    ans = N
else:
    ans = 2 * N

print(ans)
print()

Submission status: Accepted

Solution code:
N=int(input())
from fractions import gcd
print(2*N//gcd(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:
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)
	exit()
i = n * 2
while(1):
	if i % n == 0:
		print(i)
		exit()
	i += 2

Submission status: Accepted

Solution code:
n = int(input())
result = n

while True:
    if (result % n == 0) & (result % 2 == 0):
        print(result)
        break
    result = result * 2

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import fractions
from sys import stdin
n=int(stdin.readline().rstrip())
print(int(2*n/fractions.gcd(2,n)))

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import fractions
N = int(input())
def lcm(x, y):
    return (x * y) / fractions.gcd(x, y)

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

Submission status: Accepted

Solution code:
n=int(input());print(2**(n%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)
else:
  print(N * 2)

Submission status: Accepted

Solution code:
import sys

def main():
  input = sys.stdin.readline
  N = int(input())
  if N % 2 == 0:
    print(N)
  else:
    print(2*N)


if __name__ == '__main__':
  main()

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
int_n = int(input())

print(2 * int_n if int_n % 2 != 0 else int_n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A
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:
    ans = N
else:
    ans = 2*N

print(ans)

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:
    print(n*2)
else:
    print(n)

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())

def gcd(m, n):
  while n:
    m, n = n, m%n
  return m

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

lcm(N,2)

Submission status: Accepted

Solution code:
N = int(input())

sum = 0
count = 1
while True:
    sum = N * count
    if sum % 2 == 0 and sum % N == 0:
        print(sum)
        break
    count += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

def gcd(m, n):
  while n:
    m, n = n, m%n
  return m

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

print(lcm(N,2))

Submission status: Accepted

Solution code:
n =int(input())
if n %2 != 0: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())
print(n if (n % 2 == 0) else (n * 2))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

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

#
# main
#

# 1. use list instead of stdin

#contents = '''\
#999999999\
#'''
#lines = contents.split('\n')

# 2. use stdin

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
if N % 2!=0: 
	print(2*N)
else:
  print(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(N*2)
else:
  print(N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
""" AtCoder """

import sys
input = sys.stdin.readline
 
N = int(input())

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

Submission status: Accepted

Solution code:
num = input()
print(num if num%2 == 0 else num << 1)

Submission status: Accepted

Solution code:

num = input()
print(num if num%2 == 0 else num << 1)

Submission status: Accepted

Solution code:
num = input()
print(num if num%2 == 0 else num * 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 if n%2==0 else n*2)

Submission status: Accepted

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

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

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


if __name__ == '__main__':
    main()

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(2 * n)

Submission status: Accepted

Solution code:
def gcd(x, y):
    while y != 0:
        x, y = y, x % y
    return x

n = int(input())
print((n * 2) // gcd(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())
print(N if N % 2 == 0 else N * 2)

Submission status: Accepted

Solution code:
n=int(input())
print(n if n%2!=1else 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):
    print(n*(1+(n%2!=0)))

n = int(input())
main(n)

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(n)
else :
    print(n*2)

Submission status: Accepted

Solution code:
x=int(input())
print(x*((x%2!=0)+1))

Submission status: Accepted

Solution code:
N=int(input())
if N%2==1 :
  N*=2
print(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:
N = int(input())
ans = N
if N % 2 != 0:
    ans = N * 2

print(ans)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline
N = int(input())
print(N if N % 2 == 0 else 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:
  print(2*N)
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())
print(n if n % 2==0 else n * 2)

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())
if n/n==1 and n%2==0:
    print(n)
else:
    print(n*2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

if N % 2 == 0:
  print(N)
elif N % 2 != 0:
  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 == 1:
    print(n*2)
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:
# -*- coding: utf-8 -*-


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def abc102_a():
    n = int(input())
    return [n, 2*n][n%2]


print(abc102_a())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
print(n if (n % 2 == 0) else (2 * 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:
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(int(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(N if N%2==0 else N*2)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

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(N)
else:
    print(2*N)

Submission status: Accepted

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

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())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# 最小公倍数を求める関数
def lcm(a,b):
    return int((a*b)/gcd(a,b))

n = int(input())
print(lcm(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());print(n%2*n+n)

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(2 * n)
else:
    print(n)

Submission status: Accepted

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

print(lcm(int(input()), 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=input();print a+a%2*a

Submission status: Accepted

Solution code:
N = int(input())


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