#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k, h;
  while (cin >> n >> k >> h) {
    long long a[100005];
    for (int i = 0; i < n; ++i) {
      long long x;
      scanf("%I64d", &x);
      a[i] = x;
    }
    long long ans = 0, now = 0;
    for (int i = 0; i < n; ++i) {
      if (now + a[i] > k) {
        long long x;
        x = now / h;
        ans += x;
        now = now - x * h;
        now = max(0ll, now);
        if (now + a[i] > k) {
          now = 0;
          ans++;
        }
      }
      now += a[i];
    }
    if (now) {
      long long x;
      ans += ceil(1.0 * now / h);
      now -= x * h;
    }
    cout << ans << endl;
  }
}
