<html>
<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>
$("#process_all_b").click(function(){
var sum = $("#count_inp").val(), arr = [[30000,0.8],[5000,1],[2000,1.3],[0,1.5]];
sum *= arr.find(el => el[0] <= sum)[1];
$("#result p").html(sum.toFixed(0)+' Рублей');
});
</script>
</body>
</html>