#include <bits/stdc++.h>
using namespace std;
long long dis[300010], dist[300010], maxn = -1, ans;
vector<pair<int, int> > v[300010];
int flag = 0, n, siz[300010], m, sizf, f;
bool vis[300010];
bool dfs(int np, int fath) {
  vis[np] = 0;
  siz[np] = 1;
  for (auto &x : v[np]) {
    if (x.first != fath) {
      dis[x.first] = dis[np] + x.second;
      if (dfs(x.first, np))
        vis[np] = 1;
      else {
        dist[np] = max(dist[np], dist[x.first] + x.second);
        flag += (np == n);
        f += (np == 1);
      }
      siz[np] += siz[x.first];
    }
  }
  return vis[np] |= (np == n);
}
void dfs2(int np, int fath) {
  for (auto &x : v[np]) {
    if (x.first != fath && vis[x.first]) {
      if (np == 1) sizf = siz[np] - siz[x.first];
      if (dist[fath] > 0) maxn = max(maxn, dist[fath] + dis[fath]);
      if (dist[np] > 0) maxn = max(maxn, dis[fath]);
      if (maxn != -1 && np != 1)
        ans = max(ans, maxn + dist[np] + dis[n] - dis[np]);
      if (dist[fath] == 0 && fath != 0) maxn = max(maxn, dis[fath]);
      dfs2(x.first, np);
    }
  }
  if (np == n) {
    if (dist[fath] > 0) maxn = max(maxn, dist[fath] + dis[fath]);
    if (dist[np] > 0) maxn = max(maxn, dis[fath]);
    if (maxn != -1) ans = max(ans, maxn + dist[np]);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1, ti, tj, tk; i < n; i++) {
    scanf("%d%d%d", &ti, &tj, &tk);
    v[ti].push_back(make_pair(tj, tk));
    v[tj].push_back(make_pair(ti, tk));
  }
  dfs(1, 0);
  dfs2(1, 0);
  int w;
  while (m--) {
    scanf("%d", &w);
    if (flag > 1 || siz[n] >= 3)
      printf("%lld\n", dis[n]);
    else if (f > 1 || sizf >= 3)
      printf("%lld\n", dis[n]);
    else
      printf("%lld\n", min(w + ans, dis[n]));
  }
  return 0;
}
