#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 5;
long long arr[N];
int n, i, j;
long long h, k;
long long sum;
int main() {
  cin >> n >> h >> k;
  for (i = 0; i < n; i++) cin >> arr[i];
  for (i = 0; i < n; i++) {
    sum += arr[i] / k;
    int r = arr[i] % k;
    if (r + arr[i + 1] <= h)
      arr[i + 1] += r;
    else
      sum++;
  }
  if (arr[n]) sum++;
  cout << sum;
  return 0;
}
