#include <bits/stdc++.h>
using namespace std;
int x[110], y[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);
  int addt[110];
  int cost[110][110];
  addt[1] = 0;
  addt[n] = 0;
  for (int i = 2; i < n; i++) scanf("%d", &addt[i]);
  for (int i = 1; i <= n; i++) scanf("%d%d", &x[i], &y[i]);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      cost[i][j] = dis(i, j) * d - addt[i];
      if (i == j) cost[i][j] = 0;
    }
  for (int k = 2; k <= n; k++)
    for (int i = 2; i <= n; i++)
      for (int j = 2; j <= n; j++)
        if (i != j)
          if (cost[i][k] + cost[k][j] < cost[i][j])
            cost[i][j] = cost[i][k] + cost[k][j];
  int ans = 0x4f4f4f4f;
  for (int i = 2; i <= n; i++) {
    int temp = dis(1, i) * d;
    if (cost[i][n] >= 0) temp += cost[i][n];
    if (temp < ans) ans = temp;
  }
  printf("%d\n", ans);
  return 0;
}
