#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  long long int i, n, h, ans, x, curr, c;
  cin >> n >> h >> c;
  ans = 0;
  curr = 0;
  for (i = 0; i < n; i++) {
    cin >> x;
    if (curr + x <= h)
      curr += x;
    else
      ans++, curr = x;
    ans += curr / c;
    curr %= c;
  }
  ans += curr / c;
  curr %= c;
  ans += (curr > 0);
  cout << ans << "\n";
}
