function Main(input) { let data = input.split("\n"); // let data = input.split(" "); let x = Number(data[0]); let y = Number(data[1]); let L = Number(data[2]); let turn = 0; if (x!==0 && y>=0) { turn = 1; } else if (x===0 && y>=0) { turn = 0; } else if (y<0) { turn = 2; } let side = Math.ceil(Math.abs(x)/L); let vertical = Math.ceil(Math.abs(y)/L); console.log(turn + side + vertical); } Main(require("fs").readFileSync("/dev/stdin", "utf8"));