using System; namespace No048_ロボットの操縦 { class Program { static void Main(string[] args) { int x = int.Parse(Console.ReadLine()); int y = int.Parse(Console.ReadLine()); int l = int.Parse(Console.ReadLine()); int count = 0; if (y < 0) { if (x < 0) count += 2; else if (x == 0) count += 2; else count += 2; } else { if (x < 0) count++; else if (x == 0) count += 0; else count++; } x = Math.Abs(x); y = Math.Abs(y); count += Floor(x, l); count += Floor(y, l); Console.WriteLine(count); } static int Floor(int a, int b) { int result; for (result = 0; result * b < a; result++) ; return result; } } }