using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace template { class Program { static void Main(string[] args) { int x = int.Parse(Console.ReadLine()); int y = int.Parse(Console.ReadLine()); int n = int.Parse(Console.ReadLine()); Console.WriteLine((Math.Abs(x) - 1) / n + 1 + (Math.Abs(y) - 1) / n + 1); } } }