#include <bits/stdc++.h>
using namespace std;
long long n, h, k, ans = 0, rem = 0;
int a[100005];
int main() {
  cin >> n >> h >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int i = 0;
  while (i < n) {
    if ((h - rem) >= a[i]) {
      while ((h - rem) >= a[i] && i < n) {
        rem += a[i];
        i++;
      }
      ans += rem / k;
      rem = (rem % k);
    } else {
      rem = 0;
      ans++;
    }
  }
  if (rem != 0) ans++;
  cout << ans << endl;
}
