#include <bits/stdc++.h>
using namespace std;
template <typename A>
ostream &operator<<(ostream &cout, vector<A> const &v) {
  cout << "[";
  for (int i = 0; i < v.size(); i++) {
    if (i) cout << ", ";
    cout << v[i];
  }
  return cout << "]";
}
template <typename A, typename B>
ostream &operator<<(ostream &cout, pair<A, B> const &p) {
  return cout << "(" << p.first << ", " << p.second << ")";
}
template <typename A, typename B>
istream &operator>>(istream &cin, pair<A, B> &p) {
  cin >> p.first;
  return cin >> p.second;
}
long long int const mod = 998244353;
long long int const maxn = 5e5 + 7;
long long int lol[maxn];
long long int sum, ans, n, h, k;
void solve() {
  cin >> n >> h >> k;
  for (long long int i = 0; i < n; i++) cin >> lol[i];
  for (long long int i = 0; i < n; i++) {
    if (sum + lol[i] > h) sum = 0, ans++;
    sum += lol[i];
    ans += sum / k;
    sum = sum % k;
  }
  if (sum > 0) ans++;
  cout << ans << endl;
}
int main() { solve(); }
