using System; using System.Globalization; class Program { public static void Main(string[] args) { int x = int.Parse(Console.ReadLine()); int y = int.Parse(Console.ReadLine()); int k = int.Parse(Console.ReadLine()); int count = 0; if (x != 0) { count++; } if (y < 0) { count = Math.Max(2, count+1); } if (x != 0) { count += Math.Abs(x)/k; if (Math.Abs(x)%k != 0) { count++; } } if (y != 0) { count += Math.Abs(y) / k; if (Math.Abs(y) % k != 0) { count++; } } Console.WriteLine(count.ToString(CultureInfo.InvariantCulture)); } }