using System; using System.Collections.Generic; using System.Linq; using static System.Console; class Program { static void Main() { var X = int.Parse(ReadLine()); var Y = int.Parse(ReadLine()); var L = int.Parse(ReadLine()); WriteLine((X + L - 1) / L + (Y + L - 1) / L + (Y >= 0 ? X == 0 ? 0 : 1 : 2)); } }