#include <bits/stdc++.h>
int main() {
  long long n, h, k;
  while (scanf("%lld%lld%lld", &n, &h, &k) != EOF) {
    long long t, i, re = 0, s = 0;
    for (i = 1; i <= n; i++) {
      scanf("%lld", &t);
      while (re > h - t) {
        if (re < k) {
          s++;
          re = 0;
        } else {
          s += re / k;
          re %= k;
        }
      }
      re += t;
    }
    if (re % k == 0)
      s += re / k;
    else
      s += re / k + 1;
    printf("%lld\n", s);
  }
  return 0;
}
