#include <bits/stdc++.h>
using namespace std;
inline int in() {
  int32_t x;
  scanf("%d", &x);
  return x;
}
inline string get() {
  char ch[1001000];
  scanf("%s", ch);
  return ch;
}
template <class P, class Q>
inline P smin(P &a, Q b) {
  if (b < a) a = b;
  return a;
}
template <class P, class Q>
inline P smax(P &a, Q b) {
  if (a < b) a = b;
  return a;
}
const long long maxn = 1e6 + 10;
const long long base = 29;
const long long MAX_LG = 21;
const long long mod = 1e9 + 7;
const long long INF = 1e18;
long long inside = 0;
long long res = 0;
int32_t main() {
  long long n = in(), h = in(), k = in();
  for (long long i = 0; i < n; i++) {
    long long foo = in();
    if ((foo + inside) <= h) {
      inside += foo;
    } else {
      long long need = (inside - (h - foo) + k - 1) / k;
      res += need;
      inside = max(0LL, inside - (long long)need * k) + foo;
    }
  }
  res += (inside + k - 1) / k;
  cout << res << endl;
}
