#include <bits/stdc++.h>
using namespace std;
int main() {
  int roads, fuelTime;
  cin >> roads >> fuelTime;
  vector<int> distances(roads);
  vector<int> fuels(roads);
  for (int i = 0; i < roads; ++i) cin >> distances[i];
  for (int i = 0; i < roads; ++i) cin >> fuels[i];
  int counter = 0;
  int fuel = 0;
  int greatestFuel = 0;
  for (int i = 0; i < roads; ++i) {
    fuel += fuels[i];
    if (fuels[i] >= fuels[greatestFuel]) greatestFuel = i;
    while (fuel < distances[i]) {
      fuel += fuels[greatestFuel];
      counter += fuelTime;
    }
    counter += distances[i];
    fuel -= distances[i];
  }
  cout << counter << endl;
}
