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