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 += 2; if (Y != 0) { count += 2; } } count += (Y < 0) ? 3 : (Y > 0) ? 1 : 0; console.log(count); } Main(require("fs").readFileSync("/dev/stdin", "utf8"));