#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::deque;
using std::endl;
using std::map;
using std::max;
using std::min;
using std::pair;
using std::queue;
using std::sort;
using std::string;
using std::vector;
int main() {
  long long n, h, k;
  cin >> n >> h >> k;
  long long answer = 0;
  int data[100000] = {
      0,
  };
  for (int i = 0; i < n; i++) scanf("%d", data + i);
  long long cur = 0;
  for (int i = 0; i < n; i++) {
    if (cur + data[i] <= h) {
      cur += data[i];
    } else {
      answer += (cur / k);
      cur %= k;
      if (cur + data[i] > h) {
        answer++;
        cur = data[i];
      } else {
        cur += data[i];
      }
    }
  }
  answer += (cur + k - 1) / k;
  cout << answer;
  return 0;
}
