#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int num[maxn];
int main() {
  int n, h, k;
  cin >> n >> h >> k;
  long long cur = 0;
  long long cnt = 0;
  for (int i = 1; i <= n; i++) {
    long long t;
    cin >> t;
    if (cur + t <= h)
      cur += t;
    else {
      cur = t;
      cnt++;
    }
    cnt += cur / k;
    cur %= k;
  }
  if (cur > 0) cnt++;
  cout << cnt << endl;
}
