#include <bits/stdc++.h>
const long long inf = 1e18;
using namespace std;
long long read() {
  long long a = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    a = a * 10 + c - '0';
    c = getchar();
  }
  return a * f;
}
long long n, Q, cnt, h[300005];
struct Edge {
  long long fron, to, next, len;
} e[300005 << 1];
void Add(long long f, long long t, long long l) {
  e[++cnt] = (Edge){f, t, h[f], l};
  h[f] = cnt;
}
void Madd(long long f, long long t, long long l) {
  Add(f, t, l);
  Add(t, f, l);
}
long long prt[300005], dfn[300005], tot, dis[300005];
long long b[300005], nxt[300005], nxtp[300005];
bool flg[300005];
void Dfs(long long u, long long fa) {
  long long v;
  prt[u] = fa;
  dfn[u] = ++tot;
  b[tot] = u;
  if (u == n) flg[u] = 1;
  for (int i = h[u]; i; i = e[i].next) {
    v = e[i].to;
    if (v == fa) continue;
    dis[v] = dis[u] + e[i].len;
    Dfs(v, u);
    if (flg[v]) flg[u] = 1, nxt[u] = e[i].len, nxtp[u] = v;
  }
}
long long deg[300005];
long long tmp[300005 * 3];
int main() {
  n = read();
  Q = read();
  long long A, B;
  for (int i = 1; i < n; i++) {
    A = read();
    B = read();
    Madd(A, B, read());
    deg[A]++;
    deg[B]++;
  }
  Dfs(1, 0);
  bool flag = 0;
  for (int i = 2; i <= n; i++)
    if (!flg[prt[i]]) {
      flag = 1;
      break;
    }
  for (int i = 2; i < n; i++)
    if (deg[i] >= 4) {
      flag = 1;
      break;
    }
  if (deg[1] >= 3 || deg[n] >= 3) flag = 1;
  if (flag) {
    while (Q--) {
      read();
      printf("%lld\n", dis[n]);
    }
    return 0;
  }
  for (int i = 2; i <= n; i++)
    if (!flg[i]) {
      flag = 1;
      break;
    }
  if (!flag) {
    long long mnn = inf;
    for (int i = 2; i < n; i++)
      if (flg[i]) {
        mnn = min(mnn, nxt[i] + nxt[prt[i]]);
      }
    while (Q--) {
      A = read();
      if (A >= mnn)
        printf("%lld\n", dis[n]);
      else
        printf("%lld\n", dis[n] - mnn + A);
    }
    return 0;
  }
  long long len = 0, lst = -1;
  len = nxt[1];
  if (deg[1] == 2) {
    for (int i = h[1]; i; i = e[i].next) {
      if (e[i].to != nxtp[1]) {
        tmp[++tmp[0]] = e[i].len - nxt[1];
        lst = e[i].len;
        break;
      }
    }
  }
  long long now = nxtp[1];
  while (now != n) {
    if (deg[now] == 3) {
      for (int i = h[now]; i; i = e[i].next) {
        if (e[i].to != nxtp[now] && e[i].to != prt[now]) {
          tmp[++tmp[0]] = e[i].len - min(nxt[now], nxt[prt[now]]);
          if (lst != -1) tmp[++tmp[0]] = e[i].len - len + lst;
          lst = max(lst, e[i].len + len);
        }
      }
    }
    len += nxt[now];
    now = nxtp[now];
  }
  if (deg[n] == 2) {
    for (int i = h[n]; i; i = e[i].next) {
      if (e[i].to != prt[n]) {
        tmp[++tmp[0]] = e[i].len - nxt[prt[n]];
        if (lst != -1) tmp[++tmp[0]] = e[i].len - len + lst;
      }
    }
  }
  sort(tmp + 1, tmp + tmp[0] + 1);
  long long V = tmp[tmp[0]];
  while (Q--) {
    A = read();
    if (A + V >= 0)
      printf("%lld\n", dis[n]);
    else
      printf("%lld\n", dis[n] + V + A);
  }
  return 0;
}
