#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, h, k;
  cin >> n >> h >> k;
  long long a[n], sum = 0, time = 0;
  int offsetTime = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (sum + a[i] <= h) {
      sum = sum + a[i];
    } else {
      time++;
      sum = a[i];
    }
    time += sum / k;
    sum = sum % k;
  }
  time += sum / k;
  if (sum % k != 0) {
    time++;
  }
  cout << time << "\n";
}
