#include <bits/stdc++.h>
using namespace std;
const int NMax = 200;
int N, D, A[NMax], G[NMax][NMax];
pair<int, int> P[NMax];
int main() {
  scanf("%d%d", &N, &D);
  for (int i = 2; i < N; i++) scanf("%d", A + i);
  for (int i = 1; i <= N; i++) scanf("%d%d", &P[i].first, &P[i].second);
  memset(G, -1, sizeof(G));
  for (int i = 1; i < N; i++) {
    for (int j = i + 1; j <= N; j++) {
      G[i][j] =
          D * (((P[i].first - P[j].first) > 0 ? (P[i].first - P[j].first)
                                              : (-(P[i].first - P[j].first))) +
               ((P[i].second - P[j].second) > 0
                    ? (P[i].second - P[j].second)
                    : (-(P[i].second - P[j].second)))) -
          A[j];
      G[j][i] =
          D * (((P[i].first - P[j].first) > 0 ? (P[i].first - P[j].first)
                                              : (-(P[i].first - P[j].first))) +
               ((P[i].second - P[j].second) > 0
                    ? (P[i].second - P[j].second)
                    : (-(P[i].second - P[j].second)))) -
          A[i];
    }
  }
  for (int k = 1; k <= N; k++)
    for (int i = 1; i <= N; i++)
      if (G[i][k] != -1)
        for (int j = 1; j <= N; j++)
          if (G[k][j] != -1)
            if (G[i][j] == -1 || G[i][j] > G[i][k] + G[k][j])
              G[i][j] = G[i][k] + G[k][j];
  printf("%d\n", G[1][N]);
  return 0;
}
