# -*- coding:utf-8 -*- import math if __name__ == "__main__": x = input() y = input() l = input() ans = math.ceil(abs(x) / l) + math.ceil(abs(y) / l) if x != 0 and y != 0: ans += 1 if x < 0: ans += 1 print int(ans)