#include <bits/stdc++.h>
using namespace std;
long long h, n, ans, k, remain;
int main() {
  cin >> n >> h >> k;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    long long s = (remain + x - h + k - 1) / k;
    ans += s;
    remain = remain - min(remain, s * k) + x;
  }
  ans += remain / k + ((remain % k == 0) ? 0 : 1);
  cout << ans;
}
