#include <bits/stdc++.h>
using namespace std;
const int N = 100009;
const int inf = (int)1e9;
const long long linf = (long long)1e18;
int main() {
  int n, h, k;
  scanf("%d%d%d", &n, &h, &k);
  long long now = 0;
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    if (now + x <= h) {
      now += x;
    } else {
      long long t = (now + x - h + k - 1) / k;
      ans += t;
      now = max(now - t * k, 0LL) + x;
    }
  }
  ans += (now + k - 1) / k;
  cout << ans;
  return 0;
}
