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