function absoluteNumber(targetNum) { if(targetNum > 0) { return targetNum; } else { return -targetNum; } } function runner(x, y, l) { const xaxis = Math.ceil(absoluteNumber(x) / l); const yaxis = Math.ceil(absoluteNumber(y) / l); let turn = 0; if(x == 0 && y >= 0) { turn = 0; } else if(y >= 0) { turn = 1; } else { turn = 2; } const answer = xaxis + yaxis + turn; return answer; } let lines = []; let reader = require('readline').createInterface({ input: process.stdin, output: process.stdout }); reader.on('line', function(line) { lines.push(line); }); reader.on('close', function() { const X = lines[0]; const Y = lines[1]; const L = lines[2]; console.log(runner(X, Y, L)); });