#include <bits/stdc++.h>
using namespace std;
int power[105];
pair<int, int> coord[105];
int dist[105];
vector<pair<int, int> > lista[105];
int Dijkstra(int padre, int fin) {
  memset(dist, 1000005, sizeof dist);
  dist[padre] = 0;
  priority_queue<pair<int, int>, vector<pair<int, int> >,
                 greater<pair<int, int> > >
      pq;
  pq.push(pair<int, int>(0, padre));
  while (!pq.empty()) {
    pair<int, int> nodo = pq.top();
    pq.pop();
    int d = nodo.first, u = nodo.second;
    if (d > dist[u]) continue;
    for (int j = 0; j < (int)lista[u].size(); j++) {
      pair<int, int> v = lista[u][j];
      if (dist[u] + v.second < dist[v.first]) {
        dist[v.first] = dist[u] + v.second;
        pq.push(pair<int, int>(dist[v.first], v.first));
      }
    }
  }
  return dist[fin];
}
int Distancia(int i, int j) {
  return abs(coord[i].first - coord[j].first) +
         abs(coord[i].second - coord[j].second);
}
int main() {
  int n, d;
  scanf("%d %d", &n, &d);
  for (int i = 1; i < n - 1; i++) scanf("%d", &power[i]);
  for (int i = 0; i < n; i++) scanf("%d %d", &coord[i].first, &coord[i].second);
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      lista[i].push_back(pair<int, int>(j, Distancia(i, j) * d - power[i]));
      lista[j].push_back(pair<int, int>(i, Distancia(i, j) * d - power[j]));
    }
  int res = Dijkstra(0, n - 1);
  printf("%d\n", res);
  return 0;
}
