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.util.*;
    import java.io.*;

    public class Codeforces {


        public static void main(String[] args) throws IOException {
            Reader.init(System.in);
            int n = Reader.nextInt(), d = Reader.nextInt();
            int arr[] = new int[n];
            int count = 0;
            arr[0] = Reader.nextInt();
            for(int i = 1; i < n; i++){
                arr[i] = Reader.nextInt();
                
                if(arr[i] <= arr[i-1]){
                    int x  = (arr[i - 1] - arr[i])/d + 1;
                    arr[i] += x * d;
                    count += x;
                }
            }
            
            System.out.println(count);
        }
        
        public static int getPow(int n, int x){
            int p = 0;
            
            while(n % x == 0){
                p++;
                n /= x;
            }
            
            return p;
        }
    }
    
    class Pair implements Comparable<Pair>{
        int a;
        int b;

    @Override
    public int compareTo(Pair t) {
        int x = this.a - t.a;
        
        if(x == 0)
            return this.b - t.b;
       
        return x;
    }
        
    }
    
    

    class Reader {

        static BufferedReader reader;
        static StringTokenizer tokenizer;

        /**
         * call this method to initialize reader for InputStream
         */
        static void init(InputStream input) {
            reader = new BufferedReader(
                    new InputStreamReader(input));
            tokenizer = new StringTokenizer("");
        }

        /**
         * get next word
         */
        static String next() throws IOException {
            while (!tokenizer.hasMoreTokens()) {
                //TODO add check for eof if necessary
                tokenizer = new StringTokenizer(
                        reader.readLine());
            }
            return tokenizer.nextToken();
        }

        static int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        static byte nextByte() throws IOException {

            return Byte.parseByte(next());
        }

        static long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        static double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
    }