#include <bits/stdc++.h>
using namespace std;
long long a[100001];
int main() {
  long long n, h, k;
  cin >> n >> h >> k;
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
  }
  long long total = 0;
  long long s = 0;
  for (long long i = 0; i < n - 1; ++i) {
    total += a[i];
    if (total += a[i + 1] > h) {
      long long t = (total + a[i + 1] - h) / k;
      t += ((total + a[i + 1] - h) % k) > 0;
      s += t;
      total -= (t * k);
      if (total < 0) total = 0;
    }
  }
  total += a[n - 1];
  if (total > 0) {
    long long t = (total) / k;
    t += ((total) % k) > 0;
    s += t;
  }
  cout << s;
  return 0;
}
