#include <bits/stdc++.h>
using namespace std;
long long int n, k, h, i, mtvleli, x, ans = 0;
int main() {
  cin >> n >> h >> k;
  int mas[n], a;
  for (a = 1; a <= n; a++) {
    cin >> mas[a];
    if (mtvleli + mas[a] <= h)
      mtvleli = mtvleli + mas[a];
    else {
      ans++;
      mtvleli = mas[a];
    }
    ans = ans + mtvleli / k;
    mtvleli = mtvleli % k;
  }
  ans = ans + mtvleli / k;
  mtvleli = mtvleli % k;
  ans = ans + (mtvleli > 0);
  cout << ans;
  return 0;
}
