#include <bits/stdc++.h>
using namespace std;
const int maxn = 102;
long long dis[maxn][maxn], n, d, ar[maxn], x[maxn], y[maxn];
int main() {
  cin >> n >> d;
  for (int i = 2; i < n; i++) cin >> ar[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 (k != i && k != j)
          dis[i][j] = min(dis[i][j], dis[i][k] - ar[k] + dis[k][j]);
  cout << dis[1][n] << endl;
}
