#include <bits/stdc++.h>
using namespace std;
const int N = 101;
int dis[N][N], ad[N];
vector<pair<int, int> > ar;
queue<int> q;
bool v[N];
int dist[N], d, n;
void spfa() {
  memset(v, 0, sizeof(v));
  v[0] = 1;
  q.push(0);
  memset(dist, 0x3f, sizeof(dist));
  dist[0] = 0;
  while (q.size()) {
    int now = q.front();
    q.pop();
    for (int i = 0; i < n; i++)
      if (i != now) {
        if (dist[now] + dis[now][i] < dist[i]) {
          dist[i] = dist[now] + dis[now][i];
          if (!v[i]) {
            v[i] = 1;
            q.push(i);
          }
        }
      }
    v[now] = 0;
  }
}
int main() {
  cin >> n >> d;
  for (int i = 1; i < n - 1; i++) cin >> ad[i];
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    ar.push_back(make_pair(x, y));
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (i != j)
        dis[i][j] = (abs(ar[i].first - ar[j].first) +
                     abs(ar[i].second - ar[j].second)) *
                        d -
                    ad[i];
  spfa();
  printf("%d\n", dist[n - 1]);
  return 0;
}
