#include <bits/stdc++.h>
using namespace std;
long long dis[400005], dep[400005], ban[400005], id[400005], cnt = 0;
long long fa[400005], initial = 0, ans = 0;
long long GG_flag = 0;
long long n, m;
vector<pair<long long, long long> > G[400005];
void dfs(long long x, long long ff) {
  fa[x] = ff;
  for (long long i = 0; i < G[x].size(); i++) {
    long long to = G[x][i].first;
    if (to == ff) continue;
    dis[to] = dis[x] + G[x][i].second;
    dfs(to, x);
  }
}
long long a[400005], b[400005];
void solve() {
  initial = dis[n];
  long long poss = n;
  while (poss) id[++cnt] = poss, ban[poss] = 1, poss = fa[poss];
  poss = n;
  while (poss) {
    long long kl = 0;
    for (long long i = 0; i < G[poss].size(); i++) {
      long long to = G[poss][i].first, w = G[poss][i].second;
      if (ban[to]) continue;
      kl++;
      if (G[to].size() > 1) {
        GG_flag = 1;
        break;
      }
      dep[poss] = max(dep[poss], w);
    }
    if (kl > 1) GG_flag = 1;
    poss = fa[poss];
  }
  long long aux = 0;
  for (long long i = 1; i <= cnt; i++)
    a[i] = dep[id[i]] + dis[id[i]], b[i] = dep[id[i]] - dis[id[i]],
    aux = min(aux, b[i]);
  ans = aux;
  if (dep[id[cnt]]) ans = max(ans, b[cnt - 1] + a[cnt]);
  for (long long i = 2; i <= cnt; i++) {
    if (i > 2) aux = max(aux, b[i - 2]);
    if (i > 2) ans = max(ans, aux + a[i]);
    if (dep[id[i - 1]] || dep[id[i]]) ans = max(ans, b[i - 1] + a[i]);
  }
}
signed main() {
  scanf("%lld%lld", &n, &m);
  for (long long i = 1; i < n; i++) {
    long long a, b, c;
    scanf("%lld%lld%lld", &a, &b, &c);
    G[a].push_back(make_pair(b, c));
    G[b].push_back(make_pair(a, c));
  }
  dfs(1, 0);
  solve();
  while (m--) {
    long long x;
    scanf("%lld", &x);
    printf("%lld\n", (GG_flag) ? initial : min(initial, ans + x + initial));
  }
}
