#include <bits/stdc++.h>
using namespace std;
long long int arr[100010];
int main() {
  ios_base::sync_with_stdio(false);
  long long int n, h, k;
  scanf("%lld %lld %lld", &n, &h, &k);
  long long int spc = h;
  long long int ans = 0;
  long long int insd = 0;
  for (long long int i = 0; i < n; i++) scanf("%lld", &arr[i]);
  for (long long int i = 0; i < n;) {
    while (i < n && arr[i] <= spc) {
      spc = spc - arr[i];
      insd += arr[i];
      i++;
    }
    if (i != n) {
      long long int spc_req = arr[i] - spc;
      ans += spc_req / k;
      spc = spc + k * (spc_req / k);
      insd = insd - k * (spc_req / k);
      if (spc_req % k != 0) {
        if (insd < k) {
          spc = h;
          insd = 0;
        } else {
          spc += k;
          insd -= k;
        }
        ans++;
      }
    }
  }
  ans += (insd / k);
  if (insd % k != 0) ans++;
  printf("%lld\n", ans);
  return 0;
}
