#include <bits/stdc++.h>
using namespace std;
int a[100007];
int main() {
  int T, n, h, k;
  scanf("%d", &n);
  scanf("%d", &h);
  scanf("%d", &k);
  for (int i = 1; i <= (int)(n); i++) {
    scanf("%d", &a[i]);
  }
  int baki = 0;
  long long ans = 0;
  for (int i = 1; i <= (int)(n + 1); i++) {
    if (i == n + 1) {
      if (baki != 0) ans++;
      break;
    } else if (baki + a[i] <= h) {
      a[i] += baki;
    } else {
      ans++;
      baki = 0;
    }
    ans += (a[i] / k);
    baki = a[i] % k;
  }
  cout << ans << "\n";
  return 0;
}
