def main(): EW = int(input()) NS = int(input()) v = int(input()) ans = abs(NS//v) if not(NS%v==0):ans += 1 ans = abs(ans + EW//v) if not(EW%v == 0):ans += 1 if not( NS == 0 or EW == 0 ):ans += 1 if NS < 0 :ans += 1 print(ans) if __name__=="__main__": main()