#include <bits/stdc++.h>
using namespace std;
const int MAX = 110;
const int INF = 0x7fffffff / 2;
int n, G[MAX][MAX], a[MAX], vis[MAX], dis[MAX];
struct Node {
  int x, y;
} node[MAX];
int dij(int begin, int end);
int getdis(Node a, Node b);
int main() {
  int d, i, j, k;
  scanf("%d%d", &n, &d);
  for (a[1] = a[n] = 0, i = 2; i < n; i++) scanf("%d", &a[i]);
  for (i = 1; i <= n; i++) scanf("%d%d", &node[i].x, &node[i].y);
  for (i = 1; i <= n; i++)
    for (j = 1; j <= n; j++) G[i][j] = INF;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= n; j++) G[i][j] = d * getdis(node[i], node[j]);
  cout << dij(1, n) << endl;
  return 0;
}
int dij(int begin, int end) {
  int i, j, k, temp;
  memset(vis, 0, sizeof(vis));
  for (i = 1; i <= n; i++) dis[i] = G[begin][i];
  dis[begin] = 0;
  vis[begin] = 1;
  for (i = 1; i <= n; i++) {
    temp = INF;
    for (j = 1; j <= n; j++)
      if (!vis[j] && temp > dis[j]) temp = dis[k = j];
    if (temp == INF) break;
    vis[k] = 1;
    for (j = 1; j <= n; j++)
      if (!vis[j] && dis[j] > dis[k] + G[k][j] - a[k])
        dis[j] = dis[k] + G[k][j] - a[k];
  }
  return dis[end];
}
int getdis(Node a, Node b) { return abs(a.x - b.x) + abs(a.y - b.y); }
