#include <bits/stdc++.h>
using namespace std;
const int size = 110;
const int inf = 0x3f3f3f3f;
int n, a;
int dp[size][size];
int var[size], x[size], y[size];
bool vis[size];
int dist[size];
int Abs(int x) { return x > 0 ? x : -x; }
void work() {
  for (int i = 1; i <= n; i++) {
    dp[i][i] = inf;
    for (int j = i + 1; j <= n; j++) {
      dp[i][j] = dp[j][i] = (Abs(x[j] - x[i]) + Abs(y[j] - y[i])) * a;
    }
  }
}
void spfa() {
  queue<int> q;
  q.push(1);
  memset(vis, false, sizeof(vis));
  vis[1] = true;
  for (int i = 1; i <= n; i++) {
    dist[i] = (i == 1 ? 0 : dp[1][i]);
  }
  while (!q.empty()) {
    int now = q.front();
    q.pop();
    vis[now] = false;
    for (int i = 1; i <= n; i++) {
      if (i == now) continue;
      if (dist[now] + dp[now][i] - var[i] < dist[i]) {
        dist[i] = dist[now] + dp[now][i] - var[i];
        if (!vis[i]) {
          q.push(i);
          vis[i] = true;
        }
      }
    }
  }
}
int main() {
  cin >> n >> a;
  var[1] = var[n] = 0;
  for (int i = 2; i <= n - 1; i++) {
    cin >> var[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
  }
  work();
  spfa();
  cout << dist[n] << endl;
  return 0;
}
