#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, i, h, k, cur = 0, ind = 0, flag = 0;
  int a[100005] = {0};
  long long ans = 0;
  scanf("%d %d %d", &n, &h, &k);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  while (1) {
    int fl = 0;
    while (cur + a[ind] <= h && ind < n) {
      fl = 1;
      cur += a[ind];
      if (ind < n - 1)
        ind++;
      else {
        flag = 1;
        break;
      }
    }
    if (fl == 0) {
      ans++;
      cur = 0;
    } else {
      ans += static_cast<long long>((cur / k));
      cur = cur % k;
    }
    if (flag) break;
  }
  if (cur != 0) ans++;
  printf("%I64d\n", ans);
}
