#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std;
const long long MOD = 1e+9 + 7;
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int INFi = 0x7f7f7f7f;
const long long N = 105;
vector<long long> adj[N];
long long vis[N] = {};
int dx8[] = {0, 1, 1, 1, 0, -1, -1, -1}, dy8[] = {1, 1, 0, -1, -1, -1, 0, 1};
int dx4[] = {0, 1, 0, -1}, dy4[] = {1, 0, -1, 0};
int t = 1;
long long n, d1, a[N];
vector<pair<long long, long long> > v;
long long d[105][105];
void floydW() {
  for (long long k = 0; k < n; k++) {
    for (long long i = 0; i < n; i++) {
      for (long long j = 1; j < n; j++) {
        if (d[i][k] + d[k][j] < d[i][j]) d[i][j] = d[i][k] + d[k][j];
      }
    }
  }
}
void MAIN() {
  cin >> n >> d1;
  memset(d, (long long)1e9, sizeof(d));
  for (long long i = 1; i <= n - 2; i++) cin >> a[i];
  for (long long i = 1; i <= n; i++) {
    long long x, y;
    cin >> x >> y;
    v.push_back({x, y});
  }
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < n; j++) {
      if (i == j) {
        d[i][j] = 0;
        continue;
      }
      d[i][j] =
          d1 * (abs(v[i].first - v[j].first) + abs(v[i].second - v[j].second)) -
          a[i];
    }
  }
  floydW();
  cout << d[0][n - 1] << "\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed;
  cout << setprecision(10);
  ;
  mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
  ;
  while (t--) {
    MAIN();
  }
}
