A sequence a0, a1, ..., at - 1 is called increasing if ai - 1 < ai for each i: 0 < i < t.

You are given a sequence b0, b1, ..., bn - 1 and a positive integer d. In each move you may choose one element of the given sequence and add d to it. What is the least number of moves required to make the given sequence increasing?

Input

The first line of the input contains two integer numbers n and d (2 ≤ n ≤ 2000, 1 ≤ d ≤ 106). The second line contains space separated sequence b0, b1, ..., bn - 1 (1 ≤ bi ≤ 106).

Output

Output the minimal number of moves needed to make the sequence increasing.

Examples

Input

4 2
1 3 3 2


Output

3
import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Collection;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class CF11A implements Runnable{
        
    public static void main(String args[]){
       new CF11A().run();
    }
    
    @Override
    public void run(){
        try{
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
            tok = null;
            solve();
            in.close();
            out.close();
            
        }
        catch(IOException e){
            e.printStackTrace();
            System.exit(0);
        }
    }
    
    int nextInt()throws IOException{
        return Integer.parseInt(nextToken());
    } 
    
    double nextDouble()throws IOException{
        return Double.parseDouble(nextToken());
    }
    
    long nextLong() throws IOException{
        return Long.parseLong(nextToken());
    }
    
    String nextToken()throws IOException{
        while(tok == null || !tok.hasMoreTokens()){
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }
    
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok;
    //////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////
    private void solve()throws IOException{
      int N = nextInt();
      int d = nextInt();
      int[] arr = new int[N];
      for(int i = 0; i < N; i++){
          arr[i] = nextInt();
      }
      int steps = 0;
      for(int i = 1; i < N; i++){
          if(arr[i] <= arr[i - 1]){
              int s = ((arr[i - 1] - arr[i]) + d) / d;
              arr[i] += s * d;
              steps += s;
          }
      }
      
      out.println(steps);
    }
}
