x = gets.to_f.abs y = gets.to_f.abs l = gets.to_i command = (x / l).ceil + (y / l).ceil if x != 0 command += 1 end puts command