#!/usr/bin/env python import math x = abs(int(input().strip())) y = int(input().strip()) l = int(input().strip()) ntimes = 0 if x==0 else 1 if y < 0: ntimes += 1 y = abs(y) ntimes += math.ceil(x/l) ntimes += math.ceil(y/l) print(int(ntimes))