#include <bits/stdc++.h>
using namespace std;
const int MAX = 200;
const int INF = 50005000;
int main() {
  int n, d;
  cin >> n >> d;
  vector<int> incre;
  int aux;
  incre.push_back(0);
  for (int i = 0; i < n - 2; i++) {
    cin >> aux;
    incre.push_back(aux);
  }
  incre.push_back(0);
  vector<pair<int, int> > grid;
  int x, y;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    grid.push_back(make_pair(x, y));
  }
  priority_queue<pair<long long, int> > q;
  bool seen[MAX];
  memset(seen, 0, sizeof(seen));
  q.push(make_pair(0, 0));
  long long dist[MAX];
  dist[0] = 0;
  int last[MAX], cost[MAX];
  memset(last, -1, sizeof(last));
  cost[0] = 0;
  for (int i = 1; i < n; i++) {
    dist[i] = (long long)INF;
    cost[i] = (long long)INF;
  }
  while (!q.empty()) {
    int cur = q.top().second;
    q.pop();
    if (seen[cur]) continue;
    seen[cur] = true;
    for (int i = 0; i < n; i++) {
      if (seen[i] || i == cur) continue;
      int k = abs(grid[cur].first - grid[i].first) +
              abs(grid[cur].second - grid[i].second);
      k *= d;
      if (cost[i] > k + cost[cur] - incre[i]) {
        cost[i] = k + cost[cur] - incre[i];
        dist[i] = k + dist[cur];
        last[i] = cur;
        q.push(make_pair(-cost[i], i));
      }
    }
  }
  long long ans = dist[n - 1];
  int now = n - 1;
  while (last[now] != -1) {
    ans -= incre[now];
    now = last[now];
  }
  cout << ans << endl;
  return 0;
}
