#include <bits/stdc++.h>
int main() {
  int n;
  long long h, k, x, ans = 0, now = 0;
  scanf("%d%lld%lld", &n, &h, &k);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &x);
    if (now + x > h) {
      ans++;
      now = 0;
    }
    now += x;
    ans += now / k;
    now %= k;
  }
  if (now) ans++;
  printf("%I64d\n", ans);
  return 0;
}
