import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) from math import ceil x = int(readline()) y = int(readline()) l = int(readline()) if y < 0: y = abs(y) + 7 if x != 0: x = abs(x) + 7 print(ceil(y / l) + ceil(x / l))