#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX / 2;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n, d;
  cin >> n >> d;
  vector<int> as(n, 0);
  for (int i = (int)(1); i < (int)(n - 1); ++i) {
    cin >> as[i];
  }
  vector<int> xs(n), ys(n);
  for (int i = (int)(0); i < (int)(n); ++i) {
    cin >> xs[i] >> ys[i];
  }
  vector<vector<int> > G(n, vector<int>(n, INF));
  for (int i = (int)(0); i < (int)(n); ++i) {
    G[i][i] = 0;
  }
  for (int i = (int)(0); i < (int)(n); ++i) {
    for (int j = (int)(0); j < (int)(n); ++j) {
      if (i == j) {
        continue;
      }
      int cost = (abs(xs[i] - xs[j]) + abs(ys[i] - ys[j])) * d;
      int need = cost - as[i];
      G[i][j] = need;
    }
  }
  for (int k = (int)(0); k < (int)(n); ++k) {
    for (int i = (int)(0); i < (int)(n); ++i) {
      for (int j = (int)(0); j < (int)(n); ++j) {
        G[i][j] = min(G[i][j], G[i][k] + G[k][j]);
      }
    }
  }
  cout << G[0][n - 1] << endl;
  return 0;
}
