#include <bits/stdc++.h>
using namespace std;
int INF = 1e9 + 7;
int MOD = 1e9 + 7;
int n, h, k, a[100005];
int solve() {
  cin >> n >> h >> k;
  long long count = 0, ans = 0;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    long long tim = (max(count - (h - a[i]), 0LL) + k - 1) / k;
    ans += tim;
    count = max(count - tim * k, 0LL);
    count += a[i];
  }
  cout << ans + (count + k - 1) / k << endl;
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  solve();
  return 0;
}
