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: n = int(input())
  a = list(map(int, input().split()))
  b = []
  for i in range(1, n + 1):
      b.append(a[i - 1] - i)
  b.sort
  if n % 2 != 0:
      B = b[int((n - 1) / 2)]
      ans = 0
      for i in range(n):
          ans += abs(a[i] - i - 1 - B)
      print(ans)
  else:
      big = b[int((n) / 2)]
      smo = b[int(n - 2 / 2)]
      smoB = int((big + smo) / 2)
      bigB = smoB + 1
      big = smo = 0
      for i in range(n):
          big += abs(a[i] - i - 1 - bigB)
      for i in range(n):
          smo += abs(a[i] - i - 1 - smoB)
      print(min(big, smo))
  
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"}]