#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void RST(T &A) {
  memset(A, 0, sizeof(A));
}
template <class T>
inline void FLC(T &A, int x) {
  memset(A, x, sizeof(A));
}
template <class T>
inline void CLR(T &A) {
  A.clear();
}
const int dx4[] = {-1, 0, 1, 0};
const int dy4[] = {0, 1, 0, -1};
const int dx8[] = {-1, 0, 1, 0, -1, -1, 1, 1};
const int dy8[] = {0, 1, 0, -1, -1, 1, -1, 1};
const int dxhorse[] = {-2, -2, -1, -1, 1, 1, 2, 2};
const int dyhorse[] = {1, -1, 2, -2, 2, -2, 1, -1};
const int MOD = 1000000007;
const int INF = 0x3f3f3f3f;
const long long INFF = 1LL << 60;
const double EPS = 1e-9;
const double OO = 1e15;
const double PI = acos(-1.0);
template <class T>
inline void checkMin(T &a, const T b) {
  if (b < a) a = b;
}
template <class T>
inline void checkMax(T &a, const T b) {
  if (a < b) a = b;
}
template <class T>
inline T low_bit(T x) {
  return x & -x;
}
void dijkstra(int n, int mat[][300], int s, int *min, int *pre) {
  int v[300], i, j, k;
  for (i = 0; i < n; i++) min[i] = 1000000000, v[i] = 0, pre[i] = -1;
  for (min[s] = 0, j = 0; j < n; j++) {
    for (k = -1, i = 0; i < n; i++)
      if (!v[i] && (k == -1 || min[i] < min[k])) k = i;
    for (v[k] = 1, i = 0; i < n; i++)
      if (!v[i] && min[k] + mat[k][i] < min[i])
        min[i] = min[k] + mat[pre[i] = k][i];
  }
}
int mat[300][300], mmin[300], pre[300];
int n, d;
int a[300];
pair<int, int> b[300];
int main() {
  cin >> n >> d;
  for (int i = 1; i < n - 1; ++i) scanf("%d", &a[i]);
  for (int i = 0; i < n; ++i) scanf("%d%d", &b[i].first, &b[i].second);
  for (int i = 0; i < n * 2; ++i)
    for (int j = 0; j < n * 2; ++j)
      if (i != j)
        mat[i][j] = INF;
      else
        mat[i][j] = 0;
  for (int i = 1; i < n - 1; ++i) mat[i * 2][i * 2 + 1] = -a[i];
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      mat[i * 2 + 1][j * 2] =
          d * (abs(b[i].first - b[j].first) + abs(b[i].second - b[j].second));
  dijkstra(2 * n, mat, 1, mmin, pre);
  printf("%d\n", mmin[(n - 1) * 2]);
}
