#include <bits/stdc++.h>
int main() {
  int n, m = 0;
  long long k, a[200005];
  while (~scanf("%d %lld", &n, &k)) {
    for (int i = 0; i < n; i++) scanf("%lld", &a[i]);
    for (int i = 0; i < n; i += 2) {
      if (a[i] + a[i + 1] == 0)
        continue;
      else if ((a[i] + a[i + 1]) % k == 0)
        m += (a[i] + a[i + 1]) / k;
      else
        m += (a[i] + a[i + 1]) / k + 1;
    }
    printf("%d\n", m);
  }
  return 0;
}
