#include <bits/stdc++.h>
using namespace std;
int N, M;
vector<pair<int, int>> E[303030];
signed long long D[2][303030];
int ID[303030];
vector<int> cand;
int C[303030];
signed long long ma[303030];
signed long long R[303030];
int dfs(int cur, int pre, signed long long d, int id) {
  D[id][cur] = d;
  if (id == 0 && D[0][cur] + D[1][cur] == D[1][1]) cand.push_back(cur);
  C[cur] = 1;
  for (auto& e : E[cur])
    if (e.first != pre) {
      C[cur] += dfs(e.first, cur, d + e.second, id);
    }
  return C[cur];
}
void solve() {
  int i, j, k, l, r, x, y;
  string s;
  scanf("%d%d", &N, &M);
  for (i = 0; i < (N - 1); i++) {
    scanf("%d%d%d", &x, &y, &r);
    E[x].push_back({y, r});
    E[y].push_back({x, r});
  }
  dfs(N, 0, 0, 1);
  dfs(1, 0, 0, 0);
  memset(ID, 0xff, sizeof(ID));
  for (i = 0; i < (cand.size()); i++) ID[cand[i]] = i;
  int lp = 0;
  for (i = 1; i <= N; i++)
    if (ID[i] >= 0) {
      x = 0;
      for (auto& e : E[i])
        if (ID[e.first] < 0) x += C[e.first], ma[i] = e.second;
      if (x >= 2) lp = 1;
    }
  signed long long rma = 0;
  R[cand.size()] = R[cand.size() + 1] = -1LL << 50;
  for (i = cand.size() - 1; i >= 0; i--) {
    R[i] = max(R[i + 1], D[1][cand[i]] + ma[cand[i]]);
  }
  for (i = 0; i < (cand.size() - 1); i++) {
    if (ma[cand[i]] || ma[cand[i + 1]]) {
      rma = max(rma, D[0][cand[i]] + ma[cand[i]] + R[i + 1]);
    } else {
      rma = max(rma, D[0][cand[i]] + R[i + 2]);
    }
  }
  for (i = 0; i < (M); i++) {
    scanf("%d", &x);
    signed long long ret = D[0][N];
    if (lp == 0) ret = min(ret, rma + x);
    (void)printf("%I64d\n", ret);
  }
}
int main(int argc, char** argv) {
  string s;
  int i;
  if (argc == 1) ios::sync_with_stdio(false), cin.tie(0);
  for (i = 0; i < (argc - 1); i++) s += argv[i + 1], s += '\n';
  for (i = 0; i < (s.size()); i++) ungetc(s[s.size() - 1 - i], stdin);
  cout.tie(0);
  solve();
  return 0;
}
