#include <bits/stdc++.h>
using namespace std;
int a[106], dis[106][106];
struct point {
  int x;
  int y;
} p[106];
inline int dist(struct point a, struct point b) {
  return abs(a.x - b.x) + abs(a.y - b.y);
}
int main() {
  int n, d;
  while (cin >> n >> d) {
    memset(a, 0, sizeof(a));
    for (int i = 2; i <= n - 1; i++) {
      cin >> a[i];
    }
    for (int i = 1; i <= n; i++) {
      cin >> p[i].x >> p[i].y;
    }
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        if (i != j) dis[i][j] = dist(p[i], p[j]) * d - a[i];
      }
    }
    for (int k = 1; k <= n; k++) {
      for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n; j++) {
          dis[i][j] = min(dis[i][j], dis[i][k] + dis[k][j]);
        }
      }
    }
    cout << dis[1][n] << endl;
  }
  return 0;
}
