#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  cin >> n >> k;
  vector<long long> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  if (n == 1) {
    cout << (v[0] + k - 1) / k;
    return 0;
  }
  long long last = v[0];
  long long cur;
  long long res = 0;
  for (int i = 1; i < n; i++) {
    cur = v[i];
    long long tmp = last % k;
    res += (last + k - 1) / k;
    last = cur - tmp;
  }
  res += (last + k - 1) / k;
  cout << res;
  return 0;
}
