#include <bits/stdc++.h>
using namespace std;
int N, D;
int x[110], y[110], a[110];
long long dp[110];
int main(void) {
  int iter, i, j;
  cin >> N >> D;
  for ((i) = 0; (i) < (int)(N - 2); (i)++) cin >> a[i + 1];
  for ((i) = 0; (i) < (int)(N); (i)++) cin >> x[i] >> y[i];
  for ((i) = 0; (i) < (int)(N); (i)++) dp[i] = (1ll << 60);
  dp[N - 1] = 0;
  for ((iter) = 0; (iter) < (int)(N + 10); (iter)++) {
    for ((i) = 0; (i) < (int)(N); (i)++)
      for ((j) = 0; (j) < (int)(N); (j)++)
        if (i != j) {
          long long dist = (abs(x[i] - x[j]) + abs(y[i] - y[j])) * D;
          dp[i] = min(dp[i], max(dp[j] - a[j], 0ll) + dist);
        }
  }
  cout << dp[0] << endl;
  return 0;
}
