using System; using System.Linq; class Program { static void Main(string[] args) { int ew = int.Parse(Console.ReadLine()); if (ew < 0) { ew *= -1; } int ns = int.Parse(Console.ReadLine()); int range = int.Parse(Console.ReadLine()); int count = 0; if (ns != 0) { if (ns < 0) { count += 2; } count += ns / range; if (ns % range > 0) { count++; } } if (ew != 0) { count++; count += ew / range; if (ew % range > 0) { count++; } } Console.WriteLine(count); Console.ReadLine(); } }