#include <bits/stdc++.h>
using namespace std;
const int maxn = 105;
int a[maxn];
vector<pair<int, int> > p;
int dp[maxn][maxn];
int main() {
  int n, d;
  cin >> n >> d;
  for (int i = 1; i < n - 1; ++i) cin >> a[i];
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    p.push_back(make_pair(x, y));
  }
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) {
      dp[i][j] =
          d * (abs(p[i].first - p[j].first) + abs(p[i].second - p[j].second));
    }
  for (int k = 0; k < n; ++k)
    for (int i = 0; i < n; ++i)
      for (int j = 0; j < n; ++j)
        if (i != j && k != i && k != j) {
          dp[i][j] = min(dp[i][j], dp[i][k] + dp[j][k] - a[k]);
        }
  cout << dp[0][n - 1] << endl;
  return 0;
}
