#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, h, k, rest, x, tmp;
  long long ans;
  scanf("%d%d%d", &n, &h, &k);
  rest = h;
  ans = 0;
  while (n--) {
    scanf("%d", &x);
    if (x > rest) {
      tmp = (x - rest + k - 1) / k;
      ans += tmp;
      rest = min(h, rest + k * tmp);
    }
    rest -= x;
  }
  ans += (h - rest + k - 1) / k;
  printf("%lld\n", ans);
  return 0;
}
