<htm>
<head>
</head>
<body>
<div id="calc_div">
<div id="quantity_div"><p class="c">
Сколько километров <br>
<input type="text" id="count_inp" value="0"><br>
</div>
<div id="final_div">
<p class="c"><button id="process_all_b" >Посчитать</button><br></p>
<div id="result"><p class="c">Укажите расстояние</p></div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(function() {
$("#process_all_b").click(function(){
var sum = $("#count_inp").val(), k = [1.5, 1.3, 1, 0.8], r = [0, 2000, 5000, 30000], i = k.length ;
while(i--) if (sum >= r[i]) {
sum *= k[i];
break;
}
$("#result p").html(sum.toFixed(0)+' Рублей');
});
});
</script>
</body>
</html>