#include <bits/stdc++.h>
using namespace std;
int x[110], y[110], k, n;
int a[110];
int ABS(int x) { return x >= 0 ? x : -x; }
int spfa() {
  queue<int> q;
  bool inq[110];
  int d[110];
  for (int i = 1; i <= n; i++) d[i] = -1;
  memset(inq, 0, sizeof(inq));
  q.push(1);
  d[1] = 0;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    inq[u] = false;
    for (int v = 1; v <= n; v++) {
      if (u == v) continue;
      int cost = k * (ABS(x[u] - x[v]) + ABS(y[u] - y[v]));
      int dis = max(0, cost + d[u] - a[v]);
      if (d[v] == -1 || dis < d[v]) {
        d[v] = dis;
        if (!inq[v]) {
          inq[v] = 1;
          q.push(v);
        }
      }
    }
  }
  return d[n];
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 2; i <= n - 1; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) scanf("%d%d", &x[i], &y[i]);
  printf("%d\n", spfa());
}
