#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, i;
  long long h, k, a[100005], cnt = 0;
  cin >> n >> h >> k;
  for (i = 0; i < n; i++) cin >> a[i];
  long long carry = 0;
  for (i = 0; i < n; i++) {
    if (carry + a[i] <= h) {
      carry += a[i];
    } else {
      cnt += 1;
      carry = a[i];
    }
    cnt += (carry / k);
    carry %= k;
  }
  cnt += carry / k;
  carry %= k;
  cnt += (carry > 0);
  cout << cnt << '\n';
  return 0;
}
