#include <bits/stdc++.h>
using namespace std;
int n, h, k;
long long tm, sp;
void update(int a) {
  if (sp >= a) {
    sp -= 1ll * a;
    return;
  }
  long long t = 1ll * ceil(double(a - sp) / k);
  sp += 1ll * t * k;
  sp = min(h * 1ll, sp);
  sp -= 1ll * a;
  tm += 1ll * t;
}
int main() {
  cin >> n >> h >> k;
  sp = h;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    update(a);
  }
  tm += 1ll * ceil(double(h - sp) / k);
  cout << tm << endl;
  return 0;
}
