using System; using System.Linq; namespace TestConsole { class Program { static void Main(string[] args) { var X = int.Parse(Console.ReadLine()); var Y = int.Parse(Console.ReadLine()); var L = int.Parse(Console.ReadLine()); int count = X != 0 ? (Math.Abs(X) - 1) / L + 2 : 0; count += Y != 0 ? (Math.Abs(Y) - 1) / L + 1 : 0; if (Y < 0) { count++; if(X == 0) { count++; } } Console.WriteLine(count); } } }