#include <bits/stdc++.h>
using namespace std;
const int N = 300000 + 5;
struct tt {
  int to, next, cost;
} edge[N << 1];
int path[N], top;
int n, m, u, v, c, vis[N], sz[N], flag, f, szf;
long long dist[N], maxn = -1, ans, dis[N];
bool dfs(int u, int fa) {
  sz[u] = 1;
  for (int v, i = path[u]; i; i = edge[i].next)
    if ((v = edge[i].to) != fa) {
      dis[v] = dis[u] + edge[i].cost;
      if (dfs(v, u))
        vis[u] = 1;
      else
        dist[u] = max(dist[u], dist[v] + edge[i].cost), flag += (u == n),
        f += (u == 1);
      sz[u] += sz[v];
    }
  return vis[u] |= (u == n);
}
void dfs2(int u, int fa) {
  for (int v, i = path[u]; i; i = edge[i].next)
    if ((v = edge[i].to) != fa && vis[v]) {
      if (u == 1) szf = sz[u] - sz[v];
      if (dist[fa] > 0) maxn = max(maxn, dist[fa] + dis[fa]);
      if (dist[u] > 0) maxn = max(maxn, dis[fa]);
      if (maxn != -1 && u != 1)
        ans = max(ans, maxn + dist[u] + dis[n] - dis[u]);
      if (dist[fa] == 0 && fa != 0) maxn = max(maxn, dis[fa]);
      dfs2(v, u);
    }
  if (u == n) {
    if (dist[fa] > 0) maxn = max(maxn, dist[fa] + dis[fa]);
    if (dist[u] > 0) maxn = max(maxn, dis[fa]);
    if (maxn != -1) ans = max(ans, maxn + dist[u]);
  }
}
void add(int u, int v, int c) {
  edge[++top] = (tt){v, path[u], c};
  path[u] = top;
}
void work() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n; i++) {
    scanf("%d%d%d", &u, &v, &c);
    add(u, v, c), add(v, u, c);
  }
  dfs(1, 0);
  dfs2(1, 0);
  while (m--) {
    scanf("%d", &c);
    if (flag > 1 || sz[n] >= 3)
      printf("%I64d\n", dis[n]);
    else if (f > 1 || szf >= 3)
      printf("%I64d\n", dis[n]);
    else
      printf("%I64d\n", min(c + ans, dis[n]));
  }
}
int main() {
  work();
  return 0;
}
