LearnPy Hub
← Arena
EasyRating 800

Hurdle Potions

You can jump k high. Each potion adds 1 to your jump. How many potions do you need to clear every hurdle?

Input

n and k, then n hurdle heights.

Output

One integer.

Sample 1

Input
5 4
1 6 3 5 2
Output
2

Sample 2

Input
5 7
2 5 4 5 2
Output
0
solution.py
Output appears here
Hurdle Potions · Python Arena problem · LearnPy Hub