#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 123;
long long a[N];
int main() {
  int n;
  long long k, h;
  cin >> n >> h >> k;
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  long long cur = 0;
  int pos = 1;
  long long ans = 0;
  while (pos <= n || cur) {
    while (cur + a[pos] <= h && pos <= n) cur += a[pos], pos++;
    if (cur < k)
      cur = 0, ans++;
    else
      ans += cur / k, cur %= k;
  }
  printf("%lld\n", ans);
}
