# -*- coding: utf-8 -*- X = int(input()) Y = int(input()) L = int(input()) x_count = abs(X)//L x_count = x_count+1 if abs(X)%L>0 else x_count y_count = abs(Y)//L y_count = y_count+1 if abs(Y)%L>0 else y_count y_lot = 0 if Y>=0 else 1 x_lot = 0 if X==0 else 1 print(x_count+y_count+y_lot+x_lot)