#include <bits/stdc++.h>
#pragma comment(linker, "/stack:102400000,102400000")
using namespace std;
const int N = 105;
const int M = 20005;
const int INF = 0x3f3f3f3f;
const int MOD = 1000000007;
const double Pi = acos(-1.0);
int lowbit(int x) { return x & (-x); }
template <class T>
inline T f_min(T a, T b) {
  return a < b ? a : b;
}
template <class T>
inline T f_max(T a, T b) {
  return a > b ? a : b;
}
template <class T>
inline T f_abs(T a) {
  return a > 0 ? a : -a;
}
template <class T>
inline T f_gcd(T a, T b) {
  return b == 0 ? a : f_gcd(b, a % b);
}
template <class T>
inline T f_Lcm(T a, T b) {
  return a / f_gcd(a, b) * b;
}
template <class T>
inline void f_swap(T &a, T &b) {
  T t = a;
  a = b;
  b = t;
}
bool is_digit(char a) {
  if (a >= '0' && a <= '9') return true;
  return false;
}
bool is_lowch(char a) {
  if (a >= 'a' && a <= 'z') return true;
  return false;
}
bool is_upch(char a) {
  if (a >= 'A' && a <= 'Z') return true;
  return false;
}
int a[N], mp[N][N], dis[N], vis[N], n, d;
struct Node {
  int x, y;
} b[N];
int dij() {
  for (int i = 1; i <= n; ++i) dis[i] = mp[1][i];
  memset(vis, 0, sizeof(vis));
  dis[1] = 0;
  vis[1] = true;
  for (int i = 0; i < n; ++i) {
    int mi = INF, loc = 0;
    for (int j = 1; j <= n; ++j)
      if (!vis[j] && dis[j] < mi) mi = dis[j], loc = j;
    if (mi == INF) break;
    vis[loc] = true;
    for (int j = 1; j <= n; ++j)
      if (dis[loc] + mp[loc][j] < dis[j]) dis[j] = dis[loc] + mp[loc][j];
  }
  return f_max(0, dis[n]);
}
int main() {
  while (~scanf("%d%d", &n, &d)) {
    for (int i = 2; i < n; ++i) scanf("%d", &a[i]);
    a[1] = a[n] = 0;
    for (int i = 1; i <= n; ++i) scanf("%d%d", &b[i].x, &b[i].y);
    memset(mp, INF, sizeof(mp));
    for (int i = 1; i <= n; ++i) {
      for (int j = 1; j <= n; ++j)
        if (i != j)
          mp[i][j] =
              d * (f_abs(b[i].x - b[j].x) + f_abs(b[i].y - b[j].y)) - a[j];
    }
    printf("%d\n", dij());
  }
  return 0;
}
