#include <bits/stdc++.h>
using namespace std;
long long c[111][111];
int n, d, x[111], y[111], a[111];
int main() {
  scanf("%d%d", &n, &d);
  for (int i = 2; i < n; ++i) scanf("%d", &a[i]);
  for (int i = 1; i <= n; ++i) scanf("%d%d", &x[i], &y[i]);
  memset(c, 0x3f, sizeof c);
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j)
      if (i != j) {
        c[i][j] = d * (abs(x[i] - x[j]) + abs(y[i] - y[j])) - a[i];
      }
  for (int k = (1), _b = (n); k <= _b; ++k)
    for (int u = (1), _b = (n); u <= _b; ++u)
      for (int v = (1), _b = (n); v <= _b; ++v)
        c[u][v] = min(c[u][v], c[u][k] + c[k][v]);
  cout << c[1][n] << "\n";
  return 0;
}
