#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
int a[200], d[200][200], n, D;
pair<int, int> C[200];
int main() {
  scanf("%d%d", &n, &D);
  for (int i = 1; i <= n - 2; i++) scanf("%d", a + i + 1);
  for (int i = 1; i <= n; i++) scanf("%d%d", &C[i].first, &C[i].second);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      if (i == j) continue;
      d[i][j] =
          D * (abs(C[i].first - C[j].first) + abs(C[i].second - C[j].second)) -
          a[i];
    }
  for (int k = 1; k <= n; k++)
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= n; j++)
        d[i][j] = (d[i][j] < d[i][k] + d[k][j] ? d[i][j] : d[i][k] + d[k][j]);
  int ans = 0;
  if (d[1][n] > 0) ans = d[1][n];
  printf("%d\n", ans);
}
