#include <bits/stdc++.h>
int main() {
  using namespace std;
  long long n, h, k, tab[100005], result = 0, current_patato_amount;
  cin >> n >> h >> k;
  for (long long i = 0; i < n; i++) cin >> tab[i];
  current_patato_amount = tab[0];
  for (long long i = 1; i < n; i++) {
    long long amount_to_del = current_patato_amount - (h - tab[i]);
    long long time_needed = (amount_to_del + k - 1) / k;
    if (amount_to_del > 0) {
      result += time_needed;
      current_patato_amount =
          std::max(0ll, current_patato_amount - time_needed * k);
    }
    current_patato_amount += tab[i];
  }
  result += (current_patato_amount + k - 1) / k;
  cout << result;
  return 0;
}
