x = gets.chomp!.to_i.abs y = gets.chomp!.to_i.abs l = gets.chomp!.to_i inst = ((x + y) / l) inst += 1 if (x + y) % l > 0 inst += 1 if x != 0 puts inst