#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
int a[200][200], d, got[200];
struct node {
  int x, y;
} b[200];
int n;
int main() {
  while (cin >> n >> d) {
    for (int i = 0; i < n - 2; i++) cin >> got[i + 1];
    for (int i = 0; i < n; i++) cin >> b[i].x >> b[i].y;
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++)
        if (i - j)
          a[i][j] = (abs(b[i].x - b[j].x) + abs(b[i].y - b[j].y)) * d - got[i];
    for (int k = 0; k < n; k++)
      for (int i = 0; i < n; i++)
        for (int j = 0; j < n; j++) a[i][j] = min(a[i][j], a[i][k] + a[k][j]);
    cout << a[0][n - 1] << endl;
  }
  return 0;
}
