using System; namespace CompetitiveProgramming { public class Program { public static void Main(string[] args) { var X = int.Parse(Console.ReadLine()); var Y = int.Parse(Console.ReadLine()); var L = int.Parse(Console.ReadLine()); var diff_x = Math.Ceiling((double)Math.Abs(X) / L); var diff_y = Math.Ceiling((double)Math.Abs(Y) / L); var turn_count = 0; turn_count += Y < 0 ? 1 : 0; turn_count += X != 0 ? 1 : 0; turn_count += X == 0 && Y < 0 ? 1 : 0; Console.WriteLine(diff_x + diff_y + turn_count); } } }