#include <bits/stdc++.h>
using namespace std;
int n, p[5005], d, a[5005], x[5005], y[5005], i, j, k, c, dp[5005], ans;
int v[5005][5005];
bool used[5005];
int main() {
  scanf("%d%d", &n, &d);
  for (i = 2; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 1; i <= n; i++) {
    scanf("%d%d", &x[i], &y[i]);
  }
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++) {
      v[i][j] = d * (abs(x[i] - x[j]) + abs(y[i] - y[j]));
    }
  }
  int l = 0, r = 1000000007, m;
  while (l < r) {
    m = (l + r) / 2;
    for (i = 1; i <= n; i++) dp[i] = 1000000007, used[i] = 0;
    dp[1] = 0, k = 0;
    for (i = 1; i <= n; i++) {
      c = -1;
      for (j = 1; j <= n; j++) {
        if (!used[j] && (c == -1 || dp[c] > dp[j])) c = j;
      }
      used[c] = 1;
      k += used[k];
      dp[c] -= a[c];
      for (j = 1; j <= n; j++) {
        dp[j] = min(dp[j], dp[c] + v[c][j]);
      }
    }
    if (dp[n] >= m)
      l = m + 1, ans = m;
    else
      r = m;
  }
  printf("%d\n", ans);
  return 0;
}
