#include <bits/stdc++.h>
using namespace std;
long long n, m;
struct Node {
  long long to, nxt, val;
} Edge[300010 << 1];
long long Head[300010], cnt_Edge;
void Add_Edge(long long u, long long v, long long w) {
  Edge[++cnt_Edge] = (Node){v, Head[u], w};
  Head[u] = cnt_Edge;
}
long long st[300010], val[300010], tp, vis[300010];
long long dis[300010], f[300010], sz[300010];
long long q[300010], r, ans, tag;
bool dfs(long long u, long long fa) {
  if (u == n) return true;
  for (long long i = Head[u]; i; i = Edge[i].nxt) {
    long long v = Edge[i].to, w = Edge[i].val;
    if (v == fa) continue;
    st[++tp] = v;
    val[tp] = w;
    vis[v] = true;
    if (dfs(v, u)) return true;
    tp--;
    vis[v] = false;
  }
  return false;
}
void dp(long long u, long long fa) {
  sz[u] = 1;
  for (long long i = Head[u]; i; i = Edge[i].nxt) {
    long long v = Edge[i].to, w = Edge[i].val;
    if (v == fa || vis[v]) continue;
    dp(v, u);
    sz[u] += sz[v];
    f[u] = max(f[u], f[v] + w);
  }
}
signed main() {
  scanf("%lld%lld", &n, &m);
  ans = 0xcfcfcfcfcfcfcfcf;
  for (long long i = 1; i < n; i++) {
    long long u, v, w;
    scanf("%lld%lld%lld", &u, &v, &w);
    Add_Edge(u, v, w);
    Add_Edge(v, u, w);
  }
  st[tp = 1] = 1;
  vis[1] = true;
  dfs(1, 0);
  for (long long i = 1; i <= tp; i++) dis[i] = dis[i - 1] + val[i];
  for (long long i = 1; i <= tp; i++) dp(st[i], 0), tag |= (sz[st[i]] > 2);
  if (sz[st[1]] > 1 || sz[st[2]] > 1)
    ans = max(ans, f[st[1]] + f[st[2]] + dis[tp] - dis[2]);
  q[r = 1] = 1;
  for (long long i = 3; i <= tp; i++) {
    ans = max(ans, f[st[i]] + f[st[q[1]]] + dis[q[1]] + dis[tp] - dis[i]);
    if (sz[st[i]] > 1 || sz[st[i - 1]] > 1)
      ans = max(ans, f[st[i]] + f[st[i - 1]] + dis[tp] - dis[i] + dis[i - 1]);
    while (r && f[st[i - 1]] + dis[i - 1] >= f[st[q[r]]] + dis[q[r]]) r--;
    q[++r] = i - 1;
  }
  while (m--) {
    long long x;
    scanf("%lld", &x);
    printf("%lld\n", tag ? dis[tp] : min(dis[tp], ans + x));
  }
  return 0;
}
