using System; public class Hello { public static void Main() { //var sr = new System.IO.StreamReader("test.txt"); //System.Console.SetIn(sr); string line = System.Console.ReadLine().Trim(); int X = int.Parse(line); X = Math.Abs(X); line = System.Console.ReadLine().Trim(); int Y = int.Parse(line); line = System.Console.ReadLine().Trim(); int L = int.Parse(line); int count = 0; if (X == 0 && Y == 0) { System.Console.WriteLine(0); return; } else if (X == 0) { if (Y > 0) { count = (int)(Math.Ceiling((double)Y / (double)L)); System.Console.WriteLine(count); return; } else { count = (int)(Math.Ceiling((double)Y / (double)L) + 2); System.Console.WriteLine(count); return; } } else if (Y == 0) { count += (int)(Math.Ceiling((double)X / (double)L)) + 1; System.Console.WriteLine(count); return; } else if (Y > 0) { count = (int)(Math.Ceiling((double)Y / (double)L)); count += (int)(Math.Ceiling((double)X / (double)L)) + 1; System.Console.WriteLine(count); return; } else { count = (int)(Math.Ceiling((double)X / (double)L) + 1); count = (int)(Math.Ceiling((double)Y / (double)L) + 1); System.Console.WriteLine(count); return; } } }