#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int x, n, h, k, nb = 0, i, bal = 0;
  scanf("%I64d %I64d %I64d", &n, &h, &k);
  for (i = 0; i < n; i++) {
    scanf("%I64d", &x);
    if (bal + x <= h)
      bal += x;
    else {
      nb++;
      bal = x;
    }
    nb += bal / k;
    bal = bal % k;
    if ((i == n - 1) && (bal != 0)) nb++;
  }
  cout << nb;
  return 0;
}
