#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int mod = 998244353;
const int N = 3e5 + 10;
long long c[N], dp[N], dep[N], pr[N], sb[N];
int head[N], cnt, fa[N], n, m, nu_mx[N], pos[N];
bool vis[N];
bool ok[N];
struct edge {
  int next, to, w;
} e[N << 1];
void add(int u, int v, int w) {
  e[++cnt].next = head[u];
  e[cnt].to = v;
  e[cnt].w = w;
  head[u] = cnt;
}
void dfs(int u, int f, long long depth) {
  fa[u] = f;
  dep[u] = depth;
  for (int i = head[u]; i; i = e[i].next) {
    int v = e[i].to;
    if (v == f) continue;
    dfs(v, u, depth + e[i].w);
  }
}
void dfs1(int u) {
  vis[u] = true;
  int de = 0;
  for (int i = head[u]; i; i = e[i].next) {
    int v = e[i].to, w = e[i].w;
    if (vis[v]) continue;
    dfs1(v);
    de++;
    ok[u] |= ok[v];
    nu_mx[u] = max(nu_mx[u], nu_mx[v] + 1);
    dp[u] = max(dp[u], dp[v] + w);
  }
  if (de >= 2) ok[u] = true;
}
vector<int> lin;
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i < n; i++) {
    int a, b, c;
    scanf("%d %d %d", &a, &b, &c);
    add(a, b, c);
    add(b, a, c);
  }
  dfs(1, 0, 0);
  int x = n;
  while (x) lin.push_back(x), vis[x] = true, x = fa[x];
  reverse(lin.begin(), lin.end());
  for (auto it : lin) dfs1(it);
  bool f = false;
  for (auto it : lin) {
    f |= ok[it];
    if (nu_mx[it] > 1) f = true;
  }
  if (f) {
    while (m--) {
      int x;
      scanf("%d", &x);
      printf("%lld\n", dep[n]);
    }
  } else {
    int si = lin.size();
    for (int i = si - 1; i >= 0; i--) {
      int id = lin[i];
      if (i != si - 1) sb[i] = sb[i + 1];
      sb[i] = max(sb[i], dep[n] - dep[id] + dp[id]);
    }
    long long p = -1e18;
    for (int i = 0; i < si - 1; i++) {
      int id = lin[i];
      if (nu_mx[id] == 0 && nu_mx[lin[i + 1]] == 0) {
        if (i + 2 < si) p = max(p, sb[i + 2] + dp[id] + dep[id]);
      } else
        p = max(p, sb[i + 1] + dp[id] + dep[id]);
    }
    while (m--) {
      int x;
      scanf("%d", &x);
      printf("%lld\n", min(p + x, dep[n]));
    }
  }
  return 0;
}
