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()); int ret = (Math.Abs(x) - 1) / n == 0 ? (Math.Abs(x) - 1) / n : (Math.Abs(x) - 1) / n + 1; ret += (Math.Abs(y) - 1) / n == 0 ? (Math.Abs(y) - 1) / n + 1 : (Math.Abs(y) - 1) / n + 2; Console.WriteLine(ret); } } }