import math def move_count(length_for_one_move, length): if length == 0: return 0 else: return math.ceil(length / length_for_one_move) if __name__ == "__main__": X = int(input()) Y = int(input()) L = int(input()) total_order_count = 0 if Y >= 0: # Y軸方向へ前進 total_order_count += move_count(L, Y) if not X == 0: # 90度回転 total_order_count += 1 # X軸方向へ前進 total_order_count += move_count(L, abs(X)) else: # 90度回転 total_order_count += 1 # X軸方向へ前進 total_order_count += move_count(L, abs(X)) # 90度回転 total_order_count += 1 # Y軸方向へ前進 total_order_count += move_count(L, abs(Y)) print(total_order_count)