#include <bits/stdc++.h>
using namespace std;
long n, dd, i, j, k, b[200] = {}, x[200] = {}, y[200] = {}, a[200][200] = {};
int main() {
  cin >> n >> dd;
  for (i = 2; i < n; i++) cin >> b[i];
  for (i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
    for (j = 1; j < i; j++) {
      a[j][i] = a[i][j] = fabs(x[i] - x[j]) + fabs(y[i] - y[j]);
      a[i][j] *= dd;
      a[i][j] -= b[i];
      a[j][i] *= dd;
      a[j][i] -= b[j];
    }
  }
  for (k = 1; k <= n; k++)
    for (i = 1; i <= n; i++)
      for (j = 1; j <= n; j++)
        if ((i != j) && (i != k) && (j != k))
          if (a[i][j] > a[i][k] + a[k][j]) a[i][j] = a[i][k] + a[k][j];
  cout << a[1][n] << endl;
  return 0;
}
