#include <bits/stdc++.h>
using namespace std;
const int MAXN = 110;
const int oo = 1000 * 1000 * 1000;
int n, d, a[MAXN], x[MAXN], y[MAXN], g[MAXN][MAXN], dis[MAXN];
bool mark[MAXN];
void cal_graph() {
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j) {
      g[i][j] = (abs(x[i] - x[j]) + abs(y[i] - y[j])) * d - a[j];
      g[j][i] = (abs(x[i] - x[j]) + abs(y[i] - y[j])) * d - a[i];
    }
}
void dijkstra(int v) {
  mark[v] = true;
  for (int i = 1; i <= n; ++i) dis[i] = oo;
  dis[1] = 0;
  for (int j = 2; j <= n; ++j) dis[j] = min(dis[j], dis[1] + g[1][j]);
  for (int i = 0; i < n - 1; ++i) {
    int index = 1;
    while (mark[index]) index++;
    int tmp = index;
    for (int j = tmp; j <= n; ++j)
      if (!mark[j] && dis[index] > dis[j]) index = j;
    mark[index] = true;
    for (int j = 1; j <= n; ++j)
      if (!mark[j]) dis[j] = min(dis[j], dis[index] + g[index][j]);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> d;
  for (int i = 2; i < n; ++i) cin >> a[i];
  for (int i = 1; i <= n; ++i) cin >> x[i] >> y[i];
  cal_graph();
  dijkstra(1);
  cout << dis[n] << endl;
  return 0;
}
