#include <bits/stdc++.h>
using namespace std;
const int mx = 100 + 50;
const int inf = 2100000000;
int n, d;
struct node {
  int x, y;
} p[mx];
int g[mx][mx], a[mx];
int Dis(node &aa, node &bb, int i) {
  return d * (abs(aa.x - bb.x) + abs(aa.y - bb.y)) - a[i];
}
int spfa(int fr, int to) {
  queue<int> q;
  int dis[mx], vis[mx];
  for (int i = 1; i <= n; ++i) dis[i] = inf, vis[i] = 0;
  dis[fr] = 0, vis[fr] = 1;
  q.push(fr);
  while (!q.empty()) {
    int now = q.front();
    q.pop();
    for (int i = 1; i <= n; ++i) {
      if (dis[i] > dis[now] + g[now][i]) {
        dis[i] = dis[now] + g[now][i];
        if (!vis[i]) {
          vis[i] = 1;
          q.push(i);
        }
      }
    }
  }
  return dis[to];
}
int main() {
  while (cin >> n >> d) {
    memset(g, 0, sizeof(g));
    memset(a, 0, sizeof(a));
    for (int i = 2; i <= n - 1; ++i) scanf("%d", &a[i]);
    for (int i = 1; i <= n; ++i) scanf("%d%d", &p[i].x, &p[i].y);
    for (int i = 1; i <= n; ++i) {
      for (int j = 1; j <= n; ++j)
        if (i == j)
          g[i][j] = 0;
        else
          g[i][j] = Dis(p[i], p[j], i);
    }
    for (int k = 1; k <= n; ++k) {
      for (int i = 1; i <= n; ++i) {
        for (int j = 1; j <= n; ++j) {
          g[i][j] = min(g[i][j], g[i][k] + g[k][j]);
        }
      }
    }
    cout << g[1][n] << endl;
  }
  return 0;
}
