#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x, long long int y) {
  long long int temp;
  if (y == 0) return 1;
  temp = power(x, y / 2);
  if (y % 2 == 0)
    return temp * temp;
  else
    return x * temp * temp;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n, k, h;
  cin >> n >> h >> k;
  long long int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  long long int x = 0;
  long long int count = 0;
  for (int i = 0; i < n;) {
    if (x + a[i] <= h) {
      x += a[i];
      i++;
    } else {
      int y = ceil((double)(x + a[i] - h) / k);
      x = max((long long int)0, x - k * y);
      count += y;
    }
  }
  count += ceil((double)x / k);
  cout << count << "\n";
}
