#include <bits/stdc++.h>
int main() {
  long long n, h, k;
  std::cin >> n >> h >> k;
  std::vector<long long> xs(n);
  for (long long& x : xs) std::cin >> x;
  for (long long i = 0, l = 0, t = 0;;) {
    for (; i < n && l + xs[i] <= h; l += xs[i++])
      ;
    long long step = std::max(1LL, l / k);
    t += step;
    l = std::max(0LL, l - step * k);
    if (i == n) return std::cout << t + (l + k - 1) / k, 0;
  }
}
