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