#include <bits/stdc++.h>
int main() {
  long a, b[200000], i, c;
  long long num, sum;
  while (~scanf("%ld%ld", &a, &c)) {
    num = 0;
    sum = 0;
    memset(b, 0, sizeof(b));
    for (i = 0; i < a; i++) {
      scanf("%ld", &b[i]);
      sum = sum + b[i];
      num = num + sum / c;
      sum = sum % c;
    }
    printf("%lld\n", num);
  }
  return 0;
}
