
import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;


public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        long d = sc.nextInt(), s = sc.nextInt(),p=0,n=0,m=0;
       for (int i=0;i<d;i++)
       {
           if (p>0)
           n=sc.nextInt()-s;
           else
           n=sc.nextInt();
           if (n<0)n=0;
           for (;;)
           {

               if (n>=s)
                   if (n%s==0)
                   {
                       m+=n/s;
                       n/=n;
                       n--;
                   }else
               {
                   n-=s;
                   m++;
               }else break;
           }
           if (p>0)
           {
               m++;
               p=0;
           }
           p=n;
       }
        if (n>0)m++;
        System.out.println(m);

    }
}
