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.*;
		import java.util.*;
		
		public class byo {
			static long gcd(long a, long b) {
		
				if (b == 0)
					return a;
				return gcd(b, a % b);
			}
			static char addc(char a,char b) {
				int x=Integer.parseInt(a+"");
				int y=Integer.parseInt(b+"");
				int z=x+y;
				if(z<=9) {
					return (char)('0'+z);
				}
				z=z%10;
				return (char)('0'+z);
			}
			static String add(String a,String b) {
				String r="";
				if(a.length()>=b.length()) {
					int ai=a.length()-1;int bi=b.length()-1;
					while(bi>=0) {
						char c=addc(a.charAt(ai),b.charAt(bi));
						ai--;bi--;
						
						r=c+r;
					}
					while(ai>=0) {
						r=a.charAt(ai)+r;ai--;
					}
				}
				else {
					int ai=a.length()-1;int bi=b.length()-1;
					while(ai>=0) {
						char c=addc(a.charAt(ai),b.charAt(bi));
						ai--;bi--;
						
						r=c+r;
					}
					while(bi>=0) {
						r=b.charAt(bi)+r;bi--;
					}
				}
				
				String f="";
				int o=0;
				while(o<r.length() && r.charAt(o)=='0') {
					o++;
				}
				while(o<r.length()) {
					f+=r.charAt(o);o++;
				}
				if(f.length()==0)return "0";
				return f;
			}
			static long sub(String b,boolean flag) {
				StringBuilder re=new StringBuilder();
				for(int i=0;i<b.length();i++) {
					if(b.charAt(i)=='0') {
						if(re.length()==0)continue;
						re.append('0');
					}
					else {
						re.append((char)('9'+'1'-b.charAt(i)));
					}
				}
				if(re.length()==0) {
					return 0;
				}
				if(flag) {
					StringBuilder o=new StringBuilder();
					for(int i=0;i<re.length();i++) {
						if(re.charAt(i)=='0') {
							o.append('9');
						}
						else
							if(re.charAt(i)=='1' && o.length()==0) {
								continue;
							}
							else
								o.append((char)(re.charAt(i)-1));
					}
					if(o.length()==0) {
						return 0;
					}
					return Long.parseLong(o.toString());
				}
				return Long.parseLong(re.toString());
			}
			static int m;static int n;
			static int[]dx= {0,1,-1,0};
			static int[]dy= {1,0,0,-1};	
			static int[][]in;
			static boolean isv(int i,int j) {
				if(i>=0 && i<n && j>=0 && j<m)return true;
				return false;
			}
		    public static void main(String[] args) throws Exception{
		        MScanner sc = new MScanner(System.in);
		        PrintWriter pw = new PrintWriter(System.out);
		        int n=sc.nextInt();
		        int d=sc.nextInt();
		        int prev=0;int cur;int ans=0;
		        for(int i=0;i<n;i++) {
		        	cur=sc.nextInt();
		        	if(cur>prev) {
		        		prev=cur;
		        		continue;
		        	}
		        	int t=((prev-cur)/d)+1;
		        	prev=cur+d*t;ans+=t;
		        }
		        pw.println(ans);
		        pw.flush();
		    }
		    static int INF=(int)1e9;
		    
		    static LinkedList<Edge>adjList[];
		    static int[] dist = new int[1000000];
		    static int dijkstra(int S, int T)	//O(E log E)
			{
				Arrays.fill(dist, INF);
				PriorityQueue<Edge> pq = new PriorityQueue<Edge>();
				dist[S] = 0;
				pq.add(new Edge(S, 0));						//may add more in case of MSSP (Mult-Source)
				while(!pq.isEmpty())
				{
					Edge cur = pq.remove();
					if(cur.node == T)						//remove if all computations are needed
						return dist[T];
					if(cur.cost > dist[cur.node])			//lazy deletion
						continue;
					for(Edge nxt: adjList[cur.node])
						if(cur.cost + nxt.cost < dist[nxt.node])
							pq.add(new Edge(nxt.node, dist[nxt.node] = cur.cost + nxt.cost ));
				}
				return -1;
			}
		    static class tri implements Comparable<tri>{
		    	int x;int y;
		    	tri(int a,int b){
		    		x=a;y=b;
		    	}
				@Override
				public int compareTo(tri o) {
					if(x!=o.x) {
						return x-o.x;
					}
						return y-o.y;
					
				}
				public String toString() {
					return "("+x+" "+y+")";
				}
		    }
		    static class Edge implements Comparable<Edge>{
		    	int node;int cost;
		    	Edge(int a,int b){
		    		node=a;cost=b;
		    	}
				@Override
				public int compareTo(Edge o) {
					if(cost!=o.cost) {
						return cost-o.cost;
					}
						return node-o.node;
					
				}
				public String toString() {
					return "("+node+" "+cost+")";
				}
		    }
		    static class MScanner {
		        StringTokenizer st;
		        BufferedReader br;
		
		        public MScanner(InputStream s) {
		            br = new BufferedReader(new InputStreamReader(s));
		        }
		
		        public String next() throws IOException {
		            while (st == null || !st.hasMoreTokens())
		                st = new StringTokenizer(br.readLine());
		            return st.nextToken();
		        }
		
		        public int nextInt() throws IOException {
		            return Integer.parseInt(next());
		        }
		
		        public long nextLong() throws IOException {
		            return Long.parseLong(next());
		        }
		
		        public String nextLine() throws IOException {
		            return br.readLine();
		        }
		
		        public double nextDouble() throws IOException {
		            String x = next();
		            StringBuilder sb = new StringBuilder("0");
		            double res = 0, f = 1;
		            boolean dec = false, neg = false;
		            int start = 0;
		            if (x.charAt(0) == '-') {
		                neg = true;
		                start++;
		            }
		            for (int i = start; i < x.length(); i++)
		                if (x.charAt(i) == '.') {
		                    res = Long.parseLong(sb.toString());
		                    sb = new StringBuilder("0");
		                    dec = true;
		                } else {
		                    sb.append(x.charAt(i));
		                    if (dec)
		                        f *= 10;
		                }
		            res += Long.parseLong(sb.toString()) / f;
		            return res * (neg ? -1 : 1);
		        }
		
		        public boolean ready() throws IOException {
		            return br.ready();
		        }
		
		    }
		}