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