#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, h, k;
  cin >> n >> h >> k;
  long long t;
  long long a = 0ll;
  long long ans = 0ll;
  for (int i = 0; i < n; i++) {
    cin >> t;
    if (a + t <= h)
      a += t;
    else {
      long long d = (a + t - h + k - 1) / k;
      ans += d;
      a -= k * d;
      a = max(0ll, a);
      a += t;
    }
  }
  ans += (a + k - 1) / k;
  cout << ans;
  return 0;
}
