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()))
  
  
  def sunuke(b):
      ret = 0
      sub = 1
      for a in A:
          ret += abs(a - (b + sub))
          sub += 1
      return ret
  
  
  B = []
  
  sub = 1
  for a in A:
      b = a - sub
      B.append(b)
      sub += 1
  
  B.sort()
  b1 = N // 2
  if N < 3:
      print(sunuke(B[b1]))
      exit()
  
  b2 = b1 + 1
  b1_s = sunuke(B[b1])
  b2_s = sunuke(B[b2])
  if b1_s < b2_s:
      print(b1_s)
  else:
      print(b2_s)
  
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"}]