#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long INF = 2e18;
const int N = 1231234;
int n, h, m;
int a[N];
int main() {
  while (cin >> n >> h >> m) {
    int i, j;
    for (i = 0; i < n; ++i) {
      scanf("%d", &a[i]);
    }
    a[n] = h;
    long long ans = 0;
    int cur = 0;
    for (i = 0; i <= n;) {
      if (h - cur >= a[i]) {
        cur += a[i];
        i++;
        continue;
      }
      if (cur && cur < m) {
        ans++;
        cur = 0;
      }
      ans += cur / m;
      cur %= m;
    }
    printf("%I64d\n", ans);
  }
}
