#include <bits/stdc++.h>
using namespace std;
long long n, d;
long long charge[111];
pair<long long, long long> q[111];
long long grap[111][111];
int main() {
  cin >> n >> d;
  for (long long i = 2; i <= n - 1; i++) cin >> charge[i];
  for (long long i = 1; i <= n; i++) {
    cin >> q[i].first >> q[i].second;
  }
  for (long long i = 1; i <= n; i++)
    for (long long j = i + 1; j <= n; j++) {
      grap[i][j] =
          (abs(q[i].first - q[j].first) + abs(q[i].second - q[j].second)) * d -
          charge[i];
      grap[j][i] = grap[i][j] + charge[i] - charge[j];
    }
  bool inqq[111] = {};
  bool ch[111][111] = {};
  queue<long long> qq;
  qq.push(1);
  long long mc[111] = {};
  for (long long i = 2; i <= n; i++) mc[i] = 1e18;
  while (qq.size()) {
    long long u = qq.front();
    qq.pop();
    inqq[u] = 0;
    if (u == n) continue;
    for (long long v = 1; v <= n; v++) {
      long long t = 0;
      if (ch[u][v]) t += charge[u];
      if (mc[u] + grap[u][v] + t < mc[v]) {
        mc[v] = mc[u] + grap[u][v] + t;
        for (long long i = 1; i <= n; i++) ch[v][i] = ch[u][i];
        ch[v][u] = 1;
        if (!inqq[v]) {
          inqq[v] = 1;
          qq.push(v);
        }
      }
    }
  }
  cout << max((long long)0, mc[n]) << endl;
}
