function Main(input: string): void { const inputNumbers = input.split("/n"); const X = Number(inputNumbers[0]); const Y = Number(inputNumbers[1]); const L = Number(inputNumbers[2]); let numCommand = 0; if(X >= 0){ numCommand += X%L; if(Y != 0){ numCommand++; numCommand += Y%L; } } else { numCommand++; numCommand += Y%L; numCommand++; numCommand += X%L; } console.log(numCommand); } Main(require("fs").readFileSync("/dev/stdin", "utf8"));