#include <bits/stdc++.h>
using namespace std;
int main() {
  long n, h, k, a, ost = 0;
  long long t = 0;
  cin >> n >> h >> k;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (ost + a > h) {
      t++;
      ost = 0;
    } else {
      a += ost;
      ost = 0;
    }
    t += a / k;
    a = a % k;
    ost = a;
  }
  if (ost > 0) t++;
  cout << t;
}
