#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const int kMaxn = 3e5 + 10;
bool vis[kMaxn];
int par[kMaxn], sz[kMaxn];
long long d[2][kMaxn];
set<pair<long long, int> > S[2];
vector<pair<int, int> > adj[kMaxn];
void DFS1(int u, int fa) {
  for (auto &x : adj[u]) {
    int v = x.first;
    if (v != fa) {
      par[v] = u;
      d[0][v] = d[0][u] + x.second;
      DFS1(v, u);
      sz[u] += sz[v];
    }
  }
}
void DFS2(int u, int fa) {
  vis[u] = 1;
  sz[u] = 1;
  S[0].erase(make_pair(d[0][u], u));
  S[1].insert(make_pair(d[1][u], u));
  for (auto &x : adj[u]) {
    int v = x.first;
    if (!vis[v] && v != fa) {
      d[1][v] = d[1][u] + x.second;
      DFS2(v, u);
      sz[u] += sz[v];
    }
  }
}
void Read(int &x) {
  char ch;
  for (ch = getchar(); ch < '0' || ch > '9'; ch = getchar()) {
  }
  for (x = ch - '0', ch = getchar(); ch >= '0' && ch <= '9';
       x = (x << 3) + (x << 1) + ch - '0', ch = getchar()) {
  }
}
int main() {
  int n, m;
  Read(n);
  Read(m);
  for (int i = 1; i < n; ++i) {
    int u, v, w;
    Read(u);
    Read(v);
    Read(w);
    adj[u].emplace_back(make_pair(v, w));
    adj[v].emplace_back(make_pair(u, w));
  }
  DFS1(1, 0);
  for (int i = 1; i <= n; ++i) {
    S[0].insert(make_pair(d[0][i], i));
  }
  long long ans = 0;
  bool flag = 0;
  for (int u = n, p = par[n]; u != 1; u = p, p = par[p]) {
    DFS2(u, p);
    flag |= sz[u] >= 3;
    set<pair<long long, int> >::iterator itx = S[0].end();
    --itx;
    if (itx->second == p) {
      set<pair<long long, int> >::iterator ity = S[1].end();
      --ity;
      if (ity->second == u) {
        if (ity != S[1].begin()) {
          set<pair<long long, int> >::iterator itz = ity--;
          ans = max(ans, itx->first + ity->first);
          ity = itz;
        }
        if (itx != S[0].begin()) {
          ans = max(ans, (--itx)->first + ity->first);
        }
      } else {
        ans = max(ans, itx->first + ity->first);
      }
    } else {
      ans = max(ans, itx->first + (S[1].rbegin())->first);
    }
    d[1][p] = d[1][u] + d[0][u] - d[0][p];
  }
  DFS2(1, 0);
  flag |= sz[1] >= 3;
  for (; m--;) {
    int x;
    Read(x);
    printf("%lld\n", flag ? d[0][n] : min(d[0][n], ans + x));
  }
  return 0;
}
