#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 10;
int dp[maxn][maxn];
int a[maxn];
int n, d;
int x[maxn], y[maxn];
int main() {
  while (~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", &x[i], &y[i]);
    a[1] = a[n] = 0;
    for (int i = 1; i <= n; i++) {
      dp[i][i] = 0;
      for (int j = i + 1; j <= n; j++) {
        dp[i][j] = dp[j][i] = abs(x[j] - x[i]) + abs(y[j] - y[i]);
        dp[i][j] = dp[i][j] * d - a[j];
        dp[j][i] = dp[j][i] * d - a[i];
      }
    }
    for (int k = 1; k <= n; k++) {
      for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n; j++) {
          if (dp[i][k] + dp[k][j] < dp[i][j] && i != j && j != k && i != k)
            dp[i][j] = dp[i][k] + dp[k][j];
        }
      }
    }
    printf("%d\n", dp[1][n]);
  }
  return 0;
}
