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