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 += Math.Abs(X) / L; if (Math.Abs(X) % L > 0) count++; count += Math.Abs(Y) / L; if (Math.Abs(Y) % L > 0) count++; 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 (); } } }