#include <bits/stdc++.h>
using namespace std;
const long long A = 100000000000000LL, N = 228, K = 100;
long long i, j, n, m, a[N], x[N], y[N], d[N][N], k;
long long rost(long long i, long long j) {
  return abs(x[i] - x[j]) + abs(y[i] - y[j]);
}
int main() {
  cin >> n >> m;
  for (i = 1; i < n - 1; i++) cin >> a[i];
  for (i = 0; i < n; i++) cin >> x[i] >> y[i];
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++)
      if (i != j) d[i][j] = rost(i, j) * m - a[j];
  for (k = 0; k < n; k++)
    for (i = 0; i < n; i++)
      for (j = 0; j < n; j++) d[i][j] = min(d[i][j], d[i][k] + d[k][j]);
  cout << d[0][n - 1];
}
