#include <bits/stdc++.h>
using namespace std;
const long long INF = (long long)1e18;
long long x[100], y[100], a[100], n, c;
long long dist(long long x1, long long y1, long long x2, long long y2) {
  return (max(x1 - x2, x2 - x1) + max(y2 - y1, y1 - y2)) * c;
}
int main() {
  scanf("%I64d%I64d", &n, &c);
  for (long long i = 1; i < n - 1; i++) scanf("%I64d", &a[i]);
  for (long long i = 0; i < n; i++) scanf("%I64d%I64d", &x[i], &y[i]);
  long long d[n];
  a[0] = 0;
  a[n - 1] = 0;
  d[0] = INF;
  for (int i = 1; i < n - 1; i++) d[i] = INF;
  queue<long long> q;
  d[n - 1] = 0;
  q.push(n - 1);
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    for (long long i = 0; i < n; i++)
      if (i == v)
        continue;
      else {
        long long dd = max((long long)0, dist(x[v], y[v], x[i], y[i]) - a[i]);
        if (dd + d[v] < d[i]) {
          q.push(i);
          d[i] = dd + d[v];
        }
      }
  }
  printf("%I64d", d[0]);
  return 0;
}
