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: X, K, D = [int(x) for x in input().split()]
  if (D * K + X) > 0:
      if (X - D * K) >= 0:
          print(X - D * K)
      else:
          x = int((D * K + X) // (2 * D))
          ans0 = abs(-2 * D * (x - 1) + (D * K + X))
          ans1 = abs(-2 * D * x + (D * K + X))
          ans2 = abs(-2 * D * (x + 1) + (D * K + X))
          ans3 = abs(-2 * D * (x + 2) + (D * K + X))
          print(min(ans0, ans1, ans2, ans3))
  elif (D * K + X) <= 0:
      print(abs(D * K + X))
  
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."}]