#include <bits/stdc++.h>
using namespace std;
template <class T>
bool isPrime(T x) {
  if (x <= 1) return false;
  T i;
  for (i = 2; i * i <= x; i++)
    if (x % i == 0) return false;
  return true;
}
template <class T>
class Prime {
 public:
  vector<T> z;
  Prime() {
    z.resize(1e5 + 7);
    for (int i = (0); i < (((int)z.size())); i++) z[i] = 1;
    z[0] = 0;
    z[1] = 0;
    T j;
    for (int i = (2); i < (((int)z.size())); i++) {
      if (z[i]) {
        j = i + i;
        while (j < ((int)z.size())) {
          z[j] = 0;
          j += i;
        }
      }
    }
  }
};
template <class T>
double dist(T x1, T y1, T x2, T y2) {
  return sqrt(1. * (x2 - x1) * (x2 - x1) + 1. * (y2 - y1) * (y2 - y1));
}
template <class T>
class Point {
 public:
  T x, y;
  Point() {}
  Point(T a, T b) : x(a), y(b) {}
  bool operator==(const Point& tmp) const { return (x == tmp.x && y == tmp.y); }
  Point operator-(const Point& tmp) const {
    return Point<T>(x - tmp.x, y - tmp.y);
  }
};
char toLowerCase(char x) { return (x + 32); }
char toUpperCase(char x) { return (x - 32); }
bool isUpperCase(char x) { return (65 <= x && x <= 90) ? 1 : 0; }
bool isLowerCase(char x) { return (97 <= x && x <= 122) ? 1 : 0; }
bool isAlpha(char x) { return (isUpperCase(x) || isLowerCase(x)) ? 1 : 0; }
bool isDigit(char x) { return ('0' <= x && x <= '9') ? 1 : 0; }
template <class T>
T toDec(string s) {
  stringstream is(s);
  T res;
  is >> res;
  return res;
}
template <class T>
string toStr(T n) {
  string s;
  stringstream is;
  is << n;
  is >> s;
  return s;
}
template <class T>
void checkmin(T& a, T b) {
  if (a > b) a = b;
}
template <class T>
void checkmax(T& a, T b) {
  if (a < b) a = b;
}
int calc(pair<int, int> a, pair<int, int> b) {
  return (abs(a.first - b.first) + abs(a.second - b.second));
}
int main() {
  int n, d, x, y, vtx, mny, nmny, dt, treq;
  cin >> n >> d;
  vector<int> a(n + 1, 0);
  vector<pair<int, int> > adj(n + 1);
  for (int i = (2); i <= (n - 1); i++) cin >> a[i];
  for (int i = (1); i <= (n); i++) {
    cin >> x >> y;
    adj[i] = make_pair(x, y);
  }
  vector<int> visited(n + 1, 0);
  priority_queue<pair<int, pair<int, double> >,
                 vector<pair<int, pair<int, double> > >,
                 greater<pair<int, pair<int, double> > > >
      pq;
  pq.push(make_pair(0, make_pair(1, 0.5)));
  pair<int, pair<int, double> > pre;
  double tl, ntl;
  while (!pq.empty()) {
    pre = pq.top();
    pq.pop();
    mny = pre.first;
    vtx = pre.second.first;
    tl = pre.second.second;
    if (vtx == n) break;
    if (visited[vtx]) continue;
    visited[vtx] = 1;
    for (int j = (1); j <= (n); j++) {
      if (j != vtx && !visited[j]) {
        dt = calc(adj[vtx], adj[j]);
        treq = dt * d;
        nmny = mny;
        if (tl < treq) {
          nmny += treq - (int)tl;
          ntl = 0.5 + a[j];
        } else
          ntl = tl - treq + a[j];
        pq.push(make_pair(nmny, make_pair(j, ntl)));
      }
    }
  }
  cout << mny << "\n";
  return 0;
}
