#include <bits/stdc++.h>
using namespace std;
int n, q, x, y, z;
int par[300005];
long long res, cur;
long long cost_1[300005], cost_n[300005];
vector<pair<int, int> > v[300005];
vector<int> went;
bool np;
bool path[300005];
pair<long long, int> ar[300005];
set<pair<long long, int> > s;
void dfs2(int node, int ata) {
  cost_n[node] = cur;
  for (pair<int, int> go : v[node]) {
    if (go.first == ata) continue;
    cur += go.second;
    dfs2(go.first, node);
    cur -= go.second;
  }
}
void found() {
  for (int node : went) path[node] = true;
}
void dfs1(int node, int ata) {
  went.push_back(node);
  cost_1[node] = cur;
  par[node] = ata;
  if (node == n) found();
  for (pair<int, int> go : v[node]) {
    if (go.first == ata) continue;
    cur += go.second;
    dfs1(go.first, node);
    cur -= go.second;
  }
  went.pop_back();
}
int main() {
  srand(time(NULL));
  scanf("%d %d", &n, &q);
  for (int i = 1; i < n; i++) {
    scanf("%d %d %d", &x, &y, &z);
    v[x].push_back({y, z});
    v[y].push_back({x, z});
  }
  dfs1(1, 0);
  for (int i = 1; i <= n; i++) {
    if (path[i]) {
      if ((v[i].size()) >= 4) np = 1;
    } else {
      if ((v[i].size()) >= 2) np = 1;
    }
  }
  if (!np) {
    dfs2(n, 0);
    for (int i = 1; i <= n; i++) ar[i] = {-cost_1[i], i};
    sort(ar + 1, ar + 1 + n, greater<pair<long long, int> >());
    for (int i = 1; i <= n; i++) {
      if (i <= 2) {
        s.insert(ar[i]);
        continue;
      }
      pair<long long, int> best = *s.begin();
      if (best.second == par[ar[i].second]) best = *next(s.begin());
      res = max(res, cost_n[ar[i].second] - best.first);
      s.insert(ar[i]);
    }
  }
  while (q--) {
    scanf("%d", &x);
    if (np)
      printf("%lld\n", cost_1[n]);
    else
      printf("%lld\n", min(cost_1[n], res + x));
  }
}
