#include <bits/stdc++.h>
using namespace std;
template <class T>
int getbit(int i, T X) {
  return ((X >> (i - 1)) & 1);
}
template <class T>
T onbit(int i, T X) {
  return (X | (1 << (i - 1)));
}
template <class T>
T offbit(int i, T X) {
  return ((X | (1 << (i - 1))) - (1 << (i - 1)));
}
template <class T>
T sqr(T x) {
  return (x * x);
}
template <class T>
T cube(T x) {
  return (x * x * x);
}
template <class T>
T gcd(T a, T b) {
  T r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
int csx[4] = {0, 0, -1, 1};
int csy[4] = {-1, 1, 0, 0};
int n, x[105], y[105], dd[105], a[105];
long d_t;
long long d[105], dis[105][105];
void nhap() {
  scanf("%d %ld", &n, &d_t);
  for (typeof(n - 1) i = 2; i <= n - 1; i++) scanf("%d", &a[i]);
  for (typeof(n) i = 1; i <= n; i++) scanf("%d %d", &x[i], &y[i]);
}
void khoi_tao() {
  for (typeof(n) i = 1; i <= n; i++)
    for (typeof(n) j = 1; j <= n; j++) dis[i][j] = (long long)(1e18);
  for (typeof(n) i = 1; i <= n; i++)
    for (typeof(n) j = 1; j <= n; j++) {
      int cur = abs(x[i] - x[j]) + abs(y[i] - y[j]);
      dis[i][j] = d_t * cur - a[j];
    }
  memset(dd, 0, sizeof(dd));
}
void dijkstra() {
  for (typeof(n) i = 0; i <= n; i++) d[i] = (long long)(1e18);
  d[1] = 0;
  while (1) {
    int u = 0;
    for (typeof(n) i = 1; i <= n; i++)
      if ((dd[i] == 0) && (d[i] < d[u])) u = i;
    if (u == n) break;
    dd[u] = 1;
    for (typeof(n) i = 1; i <= n; i++)
      if ((dd[i] == 0) && (d[i] > d[u] + dis[u][i])) d[i] = d[u] + dis[u][i];
  }
  printf("%I64d", d[n]);
}
int main() {
  std::ios::sync_with_stdio(false);
  nhap();
  khoi_tao();
  dijkstra();
  return 0;
}
