#include <bits/stdc++.h>
using namespace std;
int const maxn = (int)1e2 + 111;
int const inf = (1 << 30) - 1;
int n, dc;
int d[maxn];
int used[maxn];
int x[maxn], y[maxn];
int a[maxn];
int getDist(int i, int j) {
  return ((abs(x[i] - x[j]) + abs(y[i] - y[j])) * dc);
}
int main() {
  cin >> n >> dc;
  for (int i = 2; i <= n - 1; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
  }
  for (int i = 0; i < maxn; i++) d[i] = inf;
  d[1] = 0;
  while (true) {
    int mini = inf;
    int u = -1;
    for (int i = 1; i <= n; i++) {
      if (!used[i] && d[i] < mini) {
        mini = d[i];
        u = i;
      }
    }
    if (u == -1) break;
    used[u] = true;
    for (int v = 1; v <= n; v++) {
      int dist = getDist(u, v);
      if (!used[v] && dist + d[u] - a[u] < d[v]) {
        d[v] = dist + d[u] - a[u];
      }
    }
  }
  cout << d[n] << endl;
  return 0;
}
