output_description: Print the minimum positive integer divisible by both 2 and N.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: def median_low(A):
      A.sort()
      b = A
      n = len(A)
      if n % 2 == 1:
          med = b[n // 2]
      else:
          x = b[n // 2 - 1]
          y = b[n // 2]
          med = (x + y) / 2
          if med != int(med):
              med = x
          else:
              med = int(med)
      return med
  
  
  n = (int)(input())
  A = (list)(map(int, input().split()))
  
  A = [v - i - 1 for i, v in enumerate(A)]
  x = median_low(A)
  
  print(sum(abs(v - x) for v in A))
  
problem_description: Statement
  
  You are given a positive integer N. Find the minimum positive integer
  divisible by both 2 and N.
samples: [{"input": "3", "output": "6\n    \n\n6 is divisible by both 2 and 3. Also, there is no positive integer less than 6\nthat is divisible by both 2 and 3. Thus, the answer is 6.\n\n* * *"}, {"input": "10", "output": "10\n    \n\n* * *"}, {"input": "999999999", "output": "1999999998"}]