#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, H, k;
  scanf("%d%d%d", &n, &H, &k);
  int Arr[n];
  for (int i = 0; i < n; i++) scanf("%d", &Arr[i]);
  long long int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (Arr[i] == -1) continue;
    if (Arr[i] % k == 0) {
      cnt += Arr[i] / k;
      continue;
    }
    if (Arr[i] % k + Arr[i + 1] <= H && i + 1 < n) {
      Arr[i + 1] = Arr[i] % k + Arr[i + 1];
      cnt += Arr[i] / k;
    } else if (Arr[i] <= k)
      cnt++;
    else if (i + 1 <= n) {
      int F = 0;
      cnt += Arr[i] / k;
      Arr[i] = Arr[i] % k;
      while (Arr[i] % k > k) {
        cnt += Arr[i] / k;
        Arr[i] = Arr[i] % k;
      }
      cnt++;
    }
  }
  printf("%I64d", cnt);
}
