#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
template <typename T>
T pow(T a, T b, long long m) {
  T ans = 1;
  while (b > 0) {
    if (b % 2 == 1) ans = (ans * a) % m;
    b /= 2;
    a = (a * a) % m;
  }
  return ans % m;
}
vector<long long> x;
vector<long long> y;
long long distance1(long long i, long long j) {
  long long ans = abs(x[i] - x[j]) + abs(y[i] - y[j]);
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, d;
  cin >> n >> d;
  vector<vector<long long> > g(n);
  vector<long long> time(n, 0);
  x = vector<long long>(n);
  y = vector<long long>(n);
  for (long long i = 1; i < n - 1; i++) {
    cin >> time[i];
  }
  for (long long i = 0; i < n; i++) {
    cin >> x[i];
    cin >> y[i];
  }
  vector<vector<long long> > dist(n, vector<long long>(n, LLONG_MAX));
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < n; j++) {
      if (i != j)
        dist[i][j] = d * distance1(i, j) - time[j];
      else
        dist[i][j] = 0;
    }
  }
  for (long long k = 0; k < n; k++) {
    for (long long i = 0; i < n; i++) {
      for (long long j = 0; j < n; j++) {
        dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j]);
      }
    }
  }
  cout << dist[0][n - 1];
  return 0;
}
