#include <bits/stdc++.h>
using namespace std;
int n, d, add[105], x[105], y[105];
int dist[105];
struct pt {
  int id, dis;
  bool operator<(const pt &k) const { return dis > k.dis; }
};
priority_queue<pt> Q;
int main() {
  scanf("%d %d", &n, &d);
  for (int i = (2); i <= (n - 1); i++) scanf("%d", &add[i]);
  for (int i = (1); i <= (n); i++) scanf("%d %d", &x[i], &y[i]);
  Q.push((pt){1, 0});
  for (int i = (2); i <= (n); i++) dist[i] = (1 << 29);
  while (!Q.empty()) {
    pt cur = Q.top();
    Q.pop();
    int ci = cur.id, cd = cur.dis;
    if (dist[ci] < cd) continue;
    for (int i = (1); i <= (n); i++) {
      if (i != ci) {
        if (d * (abs(x[i] - x[ci]) + abs(y[i] - y[ci])) + cd - add[i] <
            dist[i]) {
          dist[i] = d * (abs(x[i] - x[ci]) + abs(y[i] - y[ci])) + cd - add[i];
          Q.push((pt){i, dist[i]});
        }
      }
    }
  }
  printf("%d\n", dist[n]);
  return 0;
}
