#include <bits/stdc++.h>
using namespace std;
int ceiling(int num, int den) {
  if (num % den == 0) return num / den;
  return num / den + 1;
}
int main() {
  int n, h, k;
  cin >> n >> h >> k;
  int a[n], currheight = 0;
  long long seconds = 0;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n;) {
    if (currheight + a[i] <= h)
      currheight += a[i++];
    else {
      seconds += ceiling(currheight + a[i] - h, k);
      currheight = max(0, currheight - k * ceiling(currheight + a[i] - h, k));
    }
  }
  if (currheight > 0) seconds += ceiling(currheight, k);
  cout << seconds << endl;
}
