function Main(input) { var line = input.split("\n"); var X = +line[0]; var Y = +line[1]; var L = +line[2]; var count = 0; if (X != 0) { count += 1; count += Math.ceil(Math.abs(X) / L); if (Y != 0) { count += 1; count += Math.ceil(Math.abs(Y) / L); } } if( Y > 0){ count += Math.ceil(Y / L); } count += 2; count += Math.ceil(Math.abs(Y) / L); console.log(count); } Main(require("fs").readFileSync("/dev/stdin", "utf8"));