#include <bits/stdc++.h>
using namespace std;
int d[200][200], a[200], x[200], y[200];
int dist(int i, int j) { return abs(x[i] - x[j]) + abs(y[i] - y[j]); }
int main() {
  int i, j, k, D;
  int n;
  scanf("%d%d", &n, &D);
  memset(a, 0, sizeof(a));
  for (i = 1; i < n - 1; i++) scanf("%d", &a[i]);
  for (i = 0; i < n; i++) scanf("%d%d", &x[i], &y[i]);
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++) {
      if (i == j)
        d[i][j] = 0;
      else
        d[i][j] = D * dist(i, j) - a[i];
    }
  for (k = 0; k < n; k++)
    for (i = 0; i < n; i++)
      for (j = 0; j < n; j++) {
        if (d[i][j] > d[i][k] + d[k][j]) d[i][j] = d[i][k] + d[k][j];
      }
  printf("%d\n", d[0][n - 1]);
  return 0;
}
