#include <bits/stdc++.h>
using namespace std;
const int inf = 1e16;
const int MOD = 1e9 + 7;
const int N = 1e2 + 10;
int n, m, w[N], d[N][N], h[N] = {0}, D;
long long f[N];
pair<int, int> a[N];
void prepare() {
  scanf("%d%d", &n, &D);
  for (int i = 2; i <= n - 1; i++) scanf("%d", &w[i]);
  for (int i = 1; i <= n; i++) scanf("%d%d", &a[i].first, &a[i].second);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      d[i][j] = abs(a[i].first - a[j].first) + abs(a[i].second - a[j].second);
}
bool minimize(long long& a, long long b) {
  if (a > b)
    a = b;
  else
    return false;
  return true;
}
void solve() {
  priority_queue<pair<long long, int> > q;
  q.push(pair<long long, int>(0, 1));
  for (int i = 2; i <= n; i++) f[i] = inf;
  while (!q.empty()) {
    int x = q.top().second;
    long long y = -q.top().first;
    q.pop();
    if (y > f[x]) continue;
    if (x == n) break;
    h[x] = 1;
    for (int i = 2; i <= n; i++)
      if (h[i] == 0 && minimize(f[i], y + (D * d[x][i] - w[x])))
        q.push(pair<int, int>(-f[i], i));
  }
  cout << f[n];
}
int main() {
  prepare();
  solve();
}
