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