#include <bits/stdc++.h>
using namespace std;
int money[106] = {0};
int x[106], y[106];
int dis[106][106] = {0};
int main() {
  int n, d;
  cin >> n >> d;
  for (int i = 2; i <= n - 1; i++) {
    cin >> money[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      dis[i][j] = (abs(x[i] - x[j]) + abs(y[i] - y[j])) * d;
    }
  }
  for (int k = 1; k <= n; k++) {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        if (i == k || k == j || i == j) continue;
        if (dis[i][k] + dis[k][j] - money[k] < dis[i][j]) {
          dis[i][j] = dis[i][k] + dis[k][j] - money[k];
        }
      }
    }
  }
  cout << dis[1][n] << endl;
  return 0;
}
