#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long h, k;
  cin >> n >> h >> k;
  vector<long long> p(n);
  for (int i = 0; i < n; i++) {
    cin >> p[i];
  }
  long long second = 0;
  int i = 0;
  long long inside = 0;
  while (i < p.size()) {
    if (inside + p[i] <= h) {
      inside += p[i];
      i++;
    } else
      break;
  }
  while (inside != 0) {
    if (i == n) {
      if (inside == 0)
        break;
      else {
        if (inside % k == 0)
          second += inside / k;
        else
          second = second + inside / k + 1;
        break;
      }
    } else {
      if (inside < k) {
        inside = 0;
        second++;
      } else {
        second += inside / k;
        if (inside % k == 0)
          inside = 0;
        else
          inside = inside % k;
      }
      while (i < p.size()) {
        if (inside + p[i] <= h) {
          inside += p[i];
          i++;
        } else
          break;
      }
    }
  }
  cout << second << endl;
  return 0;
}
