#include <bits/stdc++.h>
using namespace std;
long long n, h, k, res = 0, kek;
long long a[100001];
int main() {
  cin >> n >> h >> k;
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long curr = 0;
  long long i = 0;
  while (i < n) {
    while (i < n && curr + a[i] <= h) {
      curr += a[i++];
    }
    long long toAdd = curr / k;
    res += toAdd;
    curr -= toAdd * k;
    if (i < n && curr + a[i] > h) {
      res++;
      curr = 0;
    }
  }
  if (curr > 0) res++;
  cout << res << endl;
  return 0;
}
