#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
int n, m, fa[300010], sz[300010], q[300010], k, sum;
int cnt, head[300010], to[600010], nxt[600010], w[600010];
long long d[300010], mx, f[300010], g[300010];
bool used[300010];
void add(int x, int y, int z) {
  cnt++;
  to[cnt] = y;
  nxt[cnt] = head[x];
  head[x] = cnt;
  w[cnt] = z;
}
void dfs(int x) {
  for (int i = head[x]; i; i = nxt[i]) {
    int y = to[i];
    if (y == fa[x]) {
      continue;
    }
    fa[y] = x;
    d[y] = d[x] + w[i];
    dfs(y);
  }
}
void dfs2(int x) {
  mx = max(mx, d[x]);
  sum++;
  for (int i = head[x]; i; i = nxt[i]) {
    int y = to[i];
    if (y == fa[x]) {
      continue;
    }
    dfs2(y);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n; i++) {
    int x, y, z;
    scanf("%d%d%d", &x, &y, &z);
    add(x, y, z);
    add(y, x, z);
  }
  dfs(1);
  int j = n;
  int k = 0;
  while (j) {
    q[++k] = j;
    used[j] = true;
    j = fa[j];
  }
  for (int i = 1; i <= n; i++) {
    if (!used[i]) {
      continue;
    }
    mx = d[i];
    sum = 1;
    for (int j = head[i]; j; j = nxt[j]) {
      int y = to[j];
      if (used[y]) {
        continue;
      }
      dfs2(y);
    }
    f[i] = mx;
    sz[i] = sum;
  }
  bool flag = false;
  for (int i = 1; i <= k; i++) {
    if (sz[q[i]] >= 3) {
      flag = true;
      break;
    }
  }
  for (int i = 1; i <= k / 2; i++) {
    swap(q[i], q[k + 1 - i]);
  }
  long long res = -inf;
  for (int i = 1; i <= k; i++) {
    int x = q[i];
    if (i == 1) {
      g[i] = f[x];
      continue;
    }
    int p = q[i - 1];
    if (f[x] > d[x]) {
      res = max(res, f[x] - d[x] * 2 + g[i - 1]);
    } else {
      if (f[p] > d[p]) {
        res = max(res, f[x] - d[x] * 2 + g[i - 1]);
      } else if (i >= 3) {
        res = max(res, f[x] - d[x] * 2 + g[i - 2]);
      }
    }
    g[i] = max(g[i - 1], f[x]);
  }
  while (m--) {
    int x;
    scanf("%d", &x);
    if (flag) {
      printf("%I64d\n", d[n]);
    } else {
      printf("%I64d\n", min(d[n], d[n] + res + x));
    }
  }
  return 0;
}
