Predict the Landslide
CJam, 62 57 bytes

As far as I can see, this is completely different approach to implement the solution from aditsu's answer.

q~:C;:HaH)*H){(:I\_@&gt;2&lt;:-C&gt;{I0a*C~)+C1a*+]z1fb_,}I?}h-H-,


Input goes in the form of h c

Example:

80 5


Output:

28


How it works

The logic is pretty straight forward here with a few tricks used to reduce code size.


Get h + 1 (+ 1 for h = 0 case) length array with each element being h to represent the cliff
Start iterating from the right most index of this array

If the two elements from current index have different more than c

Remove c from the current index element
Add 1 to next c elements of the array from the current index
Make the current index equal to the length of this new array
This makes sure that we stabilize the stones to the right of the current index first

else, reduce the current index

When we hit the left most index, we are making sure that all adjacent indexes have less than or equal to c difference
Remove any 0 or h value from the array and get length.


Code expansion

q~:C;:HaH)*H){(:I\_@&gt;2&lt;:-C&gt;{I0a*C~)+C1a*+]z1fb_,}I?}h-H-,
q~:C;:HaH)*H)
q~:C;:H                  "Read the input, evaluate it, store height in H and coeff. in C";
       aH)*              "Wrap the height number in an array and repeat it H + 1 times";
           H)            "Put H+1 on stack, representing the current index of iteration";
{(:I\_@&gt;2&lt;:-C&gt;{I0a*C~)+C1a*+]z1fb_,}I?}h
(:I\_@&gt;2&lt;:-C&gt;
(:I                      "Decrement the current index and store it in I";
   \_                    "Swap to put array on top and make 1 copy";
     @&gt;2&lt;                "Get the two elements starting from Ith index";
         :-              "Get the difference. The best part of this approach is that";
                         "For the right most index, where there is only element, it";
                         "returns the element itself, which is the expected difference";
           C&gt;            "Check if difference is greater than C";
{I0a*C~)+C1a*+]z1fb_,}   "This block will be executed when the difference is more than C";
 I0a*                    "Get an array of I length and all elements 0";
     C~)+                "Get -C value and append it to the above array";
         C1a*+           "Get C length array of 1s and concat with the above array";
              ]          "Wrap the two arrays, the cliff and the above one in an array";
               z1fb      "Transpose to get number pairs and add those pairs. For example";
                         "If we are at the right most index with H = 80 and C = 5,";
                         "The right section of the cliff looks like:";
                         "[ ... 80 80 80 80 80] and the array created in above step";
                         "looks like [ ... 0 0 0 0 -5 1 1 1 1 1]. After z, we have:";
                         "[ ... [80 0] [80 0] [80 0] [80 0] [80 -5] [1] [1] [1] [1] [1]]";
                         "After 1fb we get [ ... 80 80 80 80 75 1 1 1 1 1]";
                   _,    "Take a copy of the above resultant array and take its length";
I?                       "If difference was not greater than C, put I on stack";
                         "Now we either have the decremented index or new array length";
                         "on stack."
{ ... }h                 "This is a do while loop which makes sure that we iterate to";
                         "the left of the array. This loops runs till the top stack";
                         "element is 0 while not popping the top element";
        -H-,             "After the loop, we have the final cliff array and 0 on stack";
                         "Remove any 0 elements from the array, then remove any H";
                         "elements from the array and then take length to get the";
                         "number of columns which were modified";


Try it online here