#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, h, k;
  cin >> n >> h >> k;
  vector<int> pota;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    pota.push_back(x);
  }
  long long cur_h = 0;
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    if (cur_h + pota[i] <= h) {
      cur_h += pota[i];
    } else {
      ans++;
      cur_h = pota[i];
    }
    ans += cur_h / k;
    cur_h = cur_h % k;
  }
  ans += cur_h / k;
  cur_h = cur_h % k;
  ans += (cur_h == 0) ? 0 : 1;
  cout << ans << endl;
  return 0;
}
