#include <bits/stdc++.h>
using namespace std;
const int N = 105;
int a[N], x[N], y[N], f[N][N];
int main() {
  int n, d;
  cin >> n >> d;
  for (int i = 2; i < n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++)
      if (i != j) f[i][j] = d * (abs(x[i] - x[j]) + abs(y[i] - y[j])) - a[i];
  }
  for (int k = 1; k <= n; k++)
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= n; j++) f[i][j] = min(f[i][j], f[i][k] + f[k][j]);
  cout << f[1][n];
  return 0;
}
