#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  double n = 0, h = 0, k = 0, cur = 0;
  long long ans = 0;
  cin >> n >> h >> k;
  vector<double> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  a.push_back(h);
  for (int i = 0; i < n; i++) {
    if (cur + a[i] > h) {
      long long to_del = ceil((cur - (h - a[i])) / k);
      ans += to_del;
      cur = max(cur - to_del * k, (double)0);
    }
    cur += a[i];
  }
  ans += ceil(cur / k);
  cout << ans;
  return 0;
}
