#include <bits/stdc++.h>
using namespace std;
int city[1000 + 10];
int fuel[1000 + 10];
int time(int m, int k) {
  int ans = 0;
  int temp = 0;
  int maxfuel = 0;
  int i;
  for (i = 0; i < m; i++) {
    temp += fuel[i];
    if (fuel[i] > maxfuel) {
      maxfuel = fuel[i];
    }
    while (temp < city[i + 1]) {
      temp += maxfuel;
      ans += k;
    }
    temp -= city[i + 1];
    ans += city[i + 1];
  }
  return ans;
}
int main() {
  int m, k;
  int i;
  while (scanf("%d%d", &m, &k) != EOF) {
    for (i = 1; i <= m; i++) {
      scanf("%d", &city[i]);
    }
    for (i = 0; i < m; i++) {
      scanf("%d", &fuel[i]);
    }
    printf("%d\n", time(m, k));
  }
  return 0;
}
