Two snails
There is a rectangular field consisting of M rows and N columns. The snail has traversed this field by spiral clockwise starting from upper left corner. At that all cells has been consecutively numbered in order of traversal by numbers 1, 2, 3, ... .
Now the other snail is appearing on this field in a cell (i_1, j_1). It is necessary for him to reach a cell (i_2, j_2). Each second the snail can move into adjacent cell by horizontal or by vertical on condition that the number of this cell differs from the number of previous cell on at most k.
Your task is to determine how long the travel of second snail takes.
Input
The input file contains integer number M, N, k, i_1, j_1, i_2, j_2 (1 ≤ M, N ≤ 10^18, 1 ≤ k ≤ 2·10^18, 1 ≤ i_1, i_2 ≤ M, 1 ≤ j_1, j_{2 }≤ N). Output
In the output file write one integer number: the minimal time needed for second snail to reach required cell..