#include <bits/stdc++.h>
const int MAX_N = 100;
int dist[MAX_N + 3];
bool had[MAX_N + 3];
int t[MAX_N + 3];
int x[MAX_N + 3];
int y[MAX_N + 3];
int ed[MAX_N + 3][MAX_N + 3];
int n, d;
int main() {
  scanf("%d%d", &n, &d);
  for (int i = 1; i < n - 1; ++i) {
    scanf("%d", &t[i]);
  }
  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 = i + 1; j < n; ++j)
      ed[i][j] = ed[j][i] = d * (abs(x[i] - x[j]) + abs(y[i] - y[j]));
  memset(dist, 0x3f, sizeof(dist));
  memset(had, 0, sizeof(had));
  dist[0] = 0;
  had[0] = true;
  int i = 0;
  for (int k = 1; k < n; ++k) {
    for (int j = 1; j < n; ++j)
      if (!had[j] && dist[j] > dist[i] + ed[i][j] - t[j]) {
        dist[j] = dist[i] + ed[i][j] - t[j];
      }
    int tmp = dist[n];
    for (int j = 1; j < n; ++j)
      if (!had[j] && dist[j] < tmp) {
        tmp = dist[j];
        i = j;
      }
    had[i] = true;
  }
  printf("%d\n", dist[n - 1]);
  return 0;
}
