#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void OUTLN(T &arr, int len) {
  for (int i = 0; i < len; i++) cout << arr[i] << " ";
  cout << endl;
}
const double eps = 1e-9;
const double pi = acos(-1.0);
const int oo = 1000000000;
const int mod = 1000000007;
const double E = 2.7182818284590452353602874713527;
int n, d;
int arr[100 + 3];
int xx[100 + 3], yy[100 + 3];
pair<int, int> ln[100 + 3][100 + 3];
int cnt[100 + 3];
int dist[100 + 3];
bool vis[100 + 3];
struct cmp {
  bool operator()(int a, int b) { return dist[a] > dist[b]; }
};
priority_queue<int, vector<int>, cmp> pq;
void addedge(int u, int v) {
  int dist = abs(xx[u] - xx[v]) + abs(yy[u] - yy[v]);
  dist = dist * d;
  ln[u][cnt[u]++] = make_pair(v, dist - arr[v]);
  ln[v][cnt[v]++] = make_pair(u, dist - arr[u]);
}
void dijk() {
  fill(dist, dist + n, 100000000);
  dist[0] = 0;
  int _min;
  int index = 0;
  vis[0] = 1;
  for (int i = 1; i < n; i++) {
    for (int j = 0; j < cnt[index]; j++) {
      int nxt = ln[index][j].first;
      if (!vis[nxt] && dist[nxt] > dist[index] + ln[index][j].second) {
        dist[nxt] = dist[index] + ln[index][j].second;
        pq.push(nxt);
      }
    }
    _min = 100000000;
    while (!pq.empty() && vis[pq.top()] == true) pq.pop();
    if (pq.empty()) break;
    index = pq.top();
    vis[index] = true;
  }
}
int main() {
  cin >> n >> d;
  for (int i = 1; i < n - 1; i++) scanf("%d", arr + i);
  arr[0] = arr[n - 1] = 0;
  for (int i = 0; i < n; i++) scanf("%d%d", xx + i, yy + i);
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) addedge(i, j);
  dijk();
  cout << dist[n - 1] << endl;
}
