#include <bits/stdc++.h>
using namespace std;
double const pi = 3.1415926536;
int main() {
  int m, k, i, s, mx = 0;
  cin >> m >> k;
  int d[m];
  for (i = 0; i < m; i++) cin >> d[i];
  int fuel = 0, ans = 0;
  for (i = 0; i < m; i++) {
    cin >> s;
    if (s > mx) mx = s;
    fuel += s;
    while (fuel < d[i]) {
      fuel += mx;
      ans += k;
    }
    ans += d[i];
    fuel -= d[i];
  }
  cout << ans;
}
