#include <bits/stdc++.h>
using namespace std;
long long n, d;
long long a[105], passed[105], f[105];
pair<long long, long long> pos[105];
void input() {
  cin >> n >> d;
  for (long long i = 2; i <= n - 1; i++) {
    cin >> a[i];
  }
  for (long long i = 1; i <= n; i++) {
    cin >> pos[i].first >> pos[i].second;
  }
}
void solve() {
  long long l = 0, r = 1e9;
  while (l < r) {
    long long m = (l + r) / 2, check = 1;
    priority_queue<pair<long long, long long> > PQ;
    for (long long i = 1; i <= n; i++) {
      f[i] = -4444444444444444444;
      passed[i] = 0;
    }
    f[1] = m;
    PQ.push(make_pair(m, 1));
    while (!PQ.empty()) {
      long long u = PQ.top().second, c = PQ.top().first;
      PQ.pop();
      if (passed[u]) continue;
      passed[u] = 1;
      if (u == n) break;
      if (c <= 0) {
        check = 0;
        break;
      }
      for (long long i = 1; i <= n; i++) {
        if (passed[i]) continue;
        if (f[i] < c -
                       d * (abs(pos[u].first - pos[i].first) +
                            abs(pos[u].second - pos[i].second)) +
                       a[i]) {
          f[i] = c -
                 d * (abs(pos[u].first - pos[i].first) +
                      abs(pos[u].second - pos[i].second)) +
                 a[i];
          PQ.push(make_pair(f[i], i));
        }
      }
    }
    if (check == 1 && f[n] >= 0)
      r = m;
    else
      l = m + 1;
  }
  cout << r;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  input();
  solve();
}
