#include <bits/stdc++.h>
using namespace std;
int a[110], x[110], y[110];
int f[110][110];
int dis(int i, int j) { return abs(x[i] - x[j]) + abs(y[i] - y[j]); }
int main() {
  int n, d;
  scanf("%d%d", &n, &d);
  for (int i = 0; i < n - 2; i++) scanf("%d", a + i + 1);
  a[n - 1] = 0;
  for (int i = 0; i < n; i++) scanf("%d%d", x + i, y + i);
  for (int i = 0; i < n - 1; i++)
    for (int j = 1; j < n; j++)
      if (i == j)
        f[i][j] = 0;
      else
        f[i][j] = dis(i, j) * d - a[j];
  for (int k = 0; k < n; k++)
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++)
        if (f[i][k] + f[k][j] < f[i][j]) f[i][j] = f[i][k] + f[k][j];
  printf("%d\n", f[0][n - 1]);
  return 0;
}
