using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Application { class MainClass { public static void Main (string[] args) { var X = readInt (); var Y = readInt (); var L = readInt (); var count = 0; if (0 < Y) { if (X != 0){ count++; } } else if (X != 0){ count++; if (Y < 0){ count++; } } else if ( Y < 0) { count +=2; } count += Convert.ToInt32(Math.Ceiling(Math.Abs(X) / (double)L)); count += Convert.ToInt32(Math.Ceiling(Math.Abs(Y) / (double)L)); writeLine (count); } static void writeLine (object o) { System.Console.WriteLine (o.ToString ()); } static string readItem () { return readItems (' ') [0]; } static String[] readItems (char c) { return System.Console.ReadLine ().Split (c); } static int readInt () { return readInts (' ') [0]; } static int[] readInts (char c) { return readItems (c).Select (x => int.Parse (x)).ToArray (); } } }