#include <bits/stdc++.h>
using namespace std;
int n, D, a[100], x[100], y[100], d[100];
set<pair<int, int> > se;
int main() {
  cin >> n >> D;
  for (int i = 1; i < n - 1; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
    d[i] = 1000000000;
  }
  d[0] = 0;
  se.insert(make_pair(d[0], 0));
  while (se.size()) {
    int v = se.begin()->second;
    se.erase(se.begin());
    for (int i = 0; i < n; i++) {
      if (i == v) continue;
      if (d[v] + (abs(x[v] - x[i]) + abs(y[v] - y[i])) * D - a[i] < d[i]) {
        se.erase(make_pair(d[i], i));
        d[i] = d[v] + (abs(x[v] - x[i]) + abs(y[v] - y[i])) * D - a[i];
        se.insert(make_pair(d[i], i));
      }
    }
  }
  cout << d[n - 1] << endl;
  return 0;
}
