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.*;

public class IncreasingSequence11A
{
    public static void main(String[] args) 
    {
        // Set up scanner
        Scanner sc = new Scanner(System.in); 
        // System.out.println("Enter n");
        int n = sc.nextInt();
        // System.out.println("Enter d");
        long d = sc.nextLong();
        
        // System.out.println("Enter first element");
        long currentmax = sc.nextLong();
        long nummoves = 0;
        long totalnummoves = 0;
        for (int i=1; i<n; i++)
        {
            // System.out.println("Enter next element");
            long x = sc.nextLong();
            if (x > currentmax)
            {
                currentmax = x;
            }
            else
            {
                long needed = currentmax-x+1;
                if (needed % d == 0)
                {
                    totalnummoves += (needed / d);
                    currentmax++;
                }
                else
                {
                    nummoves = ((needed / d) + 1);
                    currentmax = x + (nummoves * d);
                    totalnummoves += nummoves;
                }
            }
            // System.out.println("Currentmax is now " + currentmax);
            // System.out.println("Number of moves is now " + totalnummoves);
        }
        System.out.println(totalnummoves);
    }
}
            
        