#include <bits/stdc++.h>
using namespace std;
long long int a[1000005];
int main() {
  long long int n, h, k, coun, temp;
  cin >> n >> h >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  coun = 0, temp = 0;
  for (int i = 0; i < n; i++) {
    temp = temp + a[i];
    coun = coun + temp / k;
    temp = temp % k;
    if (i != n - 1 && temp + a[i + 1] <= h)
      temp = temp;
    else {
      if (temp) coun++;
      temp = 0;
    }
  }
  cout << coun << endl;
}
