#include <bits/stdc++.h>
using namespace std;
const int maxx = 100001;
int main() {
  unsigned long long int arr[maxx] = {0};
  unsigned long long int a, b, c, sum = 0, ans = 0;
  cin >> a >> b >> c;
  for (unsigned long long int i = 0; i < a; i++) cin >> arr[i];
  for (unsigned long long int i = 0; i < a; i++) {
    sum += arr[i];
    if (sum > b) {
      sum = arr[i];
      ans++;
    }
    ans += sum / c;
    sum %= c;
  }
  if (sum) ans++;
  cout << ans;
}
