#coding:utf-8 from math import ceil,fabs X=float(input()) Y=float(input()) L=float(input()) if X==0 and Y!=0: print int(ceil(fabs(Y/L))) elif X!=0 and Y==0: print int(ceil(fabs(X/L))) elif X==Y==0: print 0 else: print int(ceil(fabs(Y/L))+ceil(fabs(X/L)))+1