output_description: Print the minimum possible absolute value of the coordinate of the
  destination.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      X K D
attempt: l = list(map(int, input().split()))
  x = l[0]
  k = l[1]
  d = l[2]
  x1 = abs(x)
  cou = 0
  while x1 > 0:
      x1 -= d
      cou += 1
  if k < cou:
      x2 = x1 - k * d
      print(x2)
      # if x<=0:
      #   x3=x2*(-1)
      #   print(x3)
      # else:
      #   print(x2)
  
  else:
      a = cou % 2
      b = k % 2
      x4 = x1 * (-1)
      if a == b:
          print(abs(x1))
      if a != b:
          print(x1 + d)
  
problem_description: Statement
  
  Takahashi, who lives on the number line, is now at coordinate X. He will make
  exactly K moves of distance D in the positive or negative direction.
  
  More specifically, in one move, he can go from coordinate x to x + D or x - D.
  
  He wants to make K moves so that the absolute value of the coordinate of the
  destination will be the smallest possible.
  
  Find the minimum possible absolute value of the coordinate of the destination.
samples: [{"input": "6 2 4", "output": "2\n    \n\nTakahashi is now at coordinate 6. It is optimal to make the following moves:\n\n  * Move from coordinate 6 to (6 - 4 =) 2.\n  * Move from coordinate 2 to (2 - 4 =) -2.\n\nHere, the absolute value of the coordinate of the destination is 2, and we\ncannot make it smaller.\n\n* * *"}, {"input": "7 4 3", "output": "1\n    \n\nTakahashi is now at coordinate 7. It is optimal to make, for example, the\nfollowing moves:\n\n  * Move from coordinate 7 to 4.\n  * Move from coordinate 4 to 7.\n  * Move from coordinate 7 to 4.\n  * Move from coordinate 4 to 1.\n\nHere, the absolute value of the coordinate of the destination is 1, and we\ncannot make it smaller.\n\n* * *"}, {"input": "10 1 2", "output": "8\n    \n\n* * *"}, {"input": "1000000000000000 1000000000000000 1000000000000000", "output": "1000000000000000\n    \n\nThe answer can be enormous."}]