#include <bits/stdc++.h>
int n, h, k;
int a[100100];
void solve() {
  long long res = 0;
  long long left = 0;
  int i;
  int rr;
  i = 0;
  while (i < n && left + a[i] <= h) {
    left += a[i];
    i++;
  }
  for (; i < n;) {
    rr = left / k;
    res += rr;
    left = left - rr * k;
    if (left + a[i] <= h) {
      while (i < n && left + a[i] <= h) {
        left += a[i];
        i++;
      }
    } else {
      res += 1;
      left = 0;
      while (i < n && left + a[i] <= h) {
        left += a[i];
        i++;
      }
    }
  }
  if (left == 0)
    rr = 0;
  else
    rr = (left - 1) / k + 1;
  res += rr;
  printf("%I64d\n", res);
}
int main() {
  int i;
  scanf("%d %d %d", &n, &h, &k);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  solve();
  return 0;
}
