#include <bits/stdc++.h>
using namespace std;
const int N = 300000 + 5;
int n, m, nd[N];
long long dis[2][N];
vector<pair<int, int> > g[N];
void dfs(int id, int u, int pre, long long sum) {
  dis[id][u] = sum;
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i].first;
    if (v == pre) continue;
    dfs(id, v, u, sum + g[u][i].second);
  }
}
bool cmp(int x, int y) { return dis[0][x] - dis[1][x] < dis[0][y] - dis[1][y]; }
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n; i++) {
    int u, v, w;
    scanf("%d%d%d", &u, &v, &w);
    g[u].push_back(make_pair(v, w));
    g[v].push_back(make_pair(u, w));
  }
  dfs(0, 1, 1, 0);
  dfs(1, n, n, 0);
  for (int i = 1; i <= n; i++) nd[i] = i;
  sort(nd + 1, nd + n + 1, cmp);
  set<pair<long long, int> > select;
  select.clear();
  long long mx = -1e15;
  int px = -1, py = -1;
  for (int i = 1; i <= n; i++) select.insert(make_pair(dis[1][nd[i]], nd[i]));
  for (int pos = 1; pos <= n; pos++) {
    select.erase(make_pair(dis[1][nd[pos]], nd[pos]));
    int x = nd[pos];
    vector<int> upd;
    for (int i = 0; i < g[x].size(); i++) {
      pair<long long, int> fd = make_pair(dis[1][g[x][i].first], g[x][i].first);
      set<pair<long long, int> >::iterator it = select.find(fd);
      if (it != select.end()) {
        upd.push_back(g[x][i].first);
        select.erase(it);
      }
    }
    if (!select.empty()) {
      set<pair<long long, int> >::iterator it = select.end();
      --it;
      int y = ((*it).second);
      if (dis[0][x] + dis[1][y] > mx) {
        mx = dis[0][x] + dis[1][y];
      }
    }
    for (int i = 0; i < upd.size(); i++) {
      select.insert(make_pair(dis[1][upd[i]], upd[i]));
    }
  }
  while (m--) {
    long long c;
    scanf("%lld", &c);
    printf("%lld\n", min(mx + c, dis[0][n]));
  }
  return 0;
}
