#include <bits/stdc++.h>
using namespace std;
int dp[102][102], x[102], y[102], a[102], n, d;
int main() {
  cin >> n >> d;
  for (int i = 1; i < n - 1; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (i != j) dp[i][j] = (abs(x[j] - x[i]) + abs(y[j] - y[i])) * d - a[i];
  for (int k = 0; k < n; k++)
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++) dp[i][j] = min(dp[i][j], dp[i][k] + dp[k][j]);
  cout << dp[0][n - 1] << endl;
  return 0;
}
