#include <bits/stdc++.h>
using namespace std;
const int N = 150, inf = 1e9 + 7;
int n, d, a[N], dis[N][N], x[N], y[N];
int main() {
  cin >> n >> d;
  for (int i = 1; i < n - 1; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      if (i == j)
        dis[i][j] = 0;
      else
        dis[i][j] = d * (abs(x[i] - x[j]) + abs(y[i] - y[j])) - a[j];
    }
  for (int k = 0; k < n; k++)
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++)
        dis[i][j] = min(dis[i][k] + dis[k][j], dis[i][j]);
  cout << dis[0][n - 1] << "\n";
}
