#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, j, n, k, h, ans = 0;
  long long arr[100005];
  scanf("%lld %lld %lld", &n, &h, &k);
  for (i = 0; i < n; i++) scanf("%lld", &arr[i]);
  long long curr = 0;
  long long index = 0;
  while (index < n) {
    if (curr + arr[index] <= h) {
      curr += arr[index];
      index++;
    } else {
      ans += (curr / k);
      curr -= (curr / k) * k;
      if (curr + arr[index] <= h) continue;
      if (curr != 0) {
        curr -= min(curr, k);
        ans++;
      }
    }
  }
  ans += (curr / k);
  curr -= (curr / k) * k;
  while (curr != 0) {
    curr -= min(curr, k);
    ans++;
  }
  printf("%lld", ans);
  printf("\n");
  return 0;
}
