#include <bits/stdc++.h>
using namespace std;
const int INF = 2000000000;
const double pi = acos(-1.0);
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, d;
  while (cin >> n >> d) {
    pair<int, int> p[n];
    int dist[n][n], a[n];
    memset(a, 0, sizeof(a));
    memset(dist, 0, sizeof(dist));
    for (int i = 0; i < n - 2; i++) cin >> a[i + 1];
    for (int i = 0; i < n; i++) cin >> p[i].first >> p[i].second;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (i != j)
          dist[i][j] =
              (abs(p[i].first - p[j].first) + abs(p[i].second - p[j].second)) *
                  d -
              a[i];
      }
    }
    for (int k = 0; k < n; k++)
      for (int i = 0; i < n; i++)
        for (int j = 0; j < n; j++)
          dist[i][j] = ((dist[i][j]) < (dist[i][k] + dist[k][j])
                            ? (dist[i][j])
                            : (dist[i][k] + dist[k][j]));
    cout << dist[0][n - 1] << '\n';
  }
  return 0;
}
