#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 * 1000 + 10, INF = 1 * 1000 * 1000 * 1000 + 10;
long long n, h, k, ans, a[maxn], p, in, tmp;
long long get(long long x, long long c, long long y) {
  long long s = -1, f = INF, mid;
  while (f - s > 1) {
    mid = (s + f) / 2;
    if (x * mid + c >= y)
      f = mid;
    else
      s = mid;
  }
  return f;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> h >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  while (p < n) {
    tmp = h - in;
    while (p < n && a[p] <= tmp) {
      in += a[p];
      tmp -= a[p];
      p++;
    }
    if (p < n) {
      tmp = get(k, h - in, a[p]);
      ans += tmp;
      in = max(0ll, in - tmp * k);
    }
  }
  ans += (in + k - 1) / k;
  cout << ans;
  return 0;
}
