#include <bits/stdc++.h>
using namespace std;
const int N = 110;
int a[N], g[N][N], vis[N], dis[N], n, d;
struct node {
  int x, y;
} po[N];
inline int distan(node a, node b) { return abs(a.x - b.x) + abs(a.y - b.y); }
int SPFA() {
  queue<int> q;
  vis[1] = 1;
  q.push(1);
  for (int i = 1; i <= n; i++) dis[i] = 123456789;
  dis[1] = 0;
  while (!q.empty()) {
    int out = q.front();
    q.pop();
    vis[out] = 0;
    for (int i = 1; i <= n; i++) {
      if (dis[out] + g[out][i] * d - a[i] < dis[i] && out != i) {
        dis[i] = dis[out] + g[out][i] * d - a[i];
        q.push(i);
        vis[i] = 1;
      }
    }
  }
  return dis[n];
}
int main() {
  int i, j;
  cin >> n >> d;
  for (i = 2; i <= n - 1; i++) scanf("%d", &a[i]);
  for (i = 1; i <= n; i++) cin >> po[i].x >> po[i].y;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= n; j++) g[i][j] = g[j][i] = distan(po[i], po[j]);
  cout << SPFA() << endl;
  return 0;
}
