#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:64000000")
int a, s, d, f, g, q, w, e, r, h, j;
struct qwe {
  int x, y, z;
};
int arz[200][200];
qwe ar[400];
int arx[101];
qwe z, x, c;
int inf = 1000000000;
int arc[100100];
int main() {
  cin >> a >> f;
  for (s = 1; s < a - 1; ++s) {
    cin >> ar[s].z;
  }
  for (s = 0; s < a; ++s) {
    cin >> ar[s].x >> ar[s].y;
  }
  for (s = 0; s < a; ++s) {
    for (d = 0; d < a; ++d) {
      arz[s][d] =
          (abs(ar[s].x - ar[d].x) + abs(ar[s].y - ar[d].y)) * f - ar[d].z;
    }
  }
  for (s = 0; s < a; ++s) {
    arz[a - 1][s] = inf;
    arz[s][0] = inf;
  }
  for (s = 0; s < a; ++s) {
    arx[s] = inf;
  }
  for (s = 0; s < a; ++s) {
    arz[s][s] = 0;
  }
  arx[0] = 0;
  for (g = 0; g < a; ++g) {
    for (s = 0; s < a; ++s) {
      for (d = 0; d < a; ++d) {
        if (arx[s] + arz[s][d] < arx[d]) {
          arx[d] = arx[s] + arz[s][d];
        }
      }
    }
  }
  cout << arx[a - 1];
  return 0;
}
