#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int N = 300005, M = N;
long long power(long long a, long long b) {
  if (b == 0) return 1;
  if (b == 1) return a;
  if (b % 2 == 1) return (power(a, b - 1) * a) % 998244353;
  long long q = power(a, b / 2);
  return (q * q) % 998244353;
}
int main() {
  long long ans;
  long long a, b, res = 0, h, cur;
  long long v[100005];
  unordered_set<int> s;
  string y[1005];
  vector<pair<int, int> > p;
  cin >> a >> b >> h;
  ans = 0;
  cur = 0;
  for (int i = 0; i < a; ++i) {
    long long x;
    cin >> x;
    if (cur + x <= b) {
      cur += x;
    } else {
      ans++, cur = x;
    }
    ans += cur / h;
    cur %= h;
  }
  ans += cur / h;
  cur %= h;
  ans += (cur > 0);
  cout << ans << endl;
  return 0;
}
