#include <bits/stdc++.h>
using namespace std;
long long ch[300005], q[300005], dis[300005][2], deep[300005][2], siz[300005],
    n, m, tot, target[600005], pre[600005], last[300005], w[600005];
bool type[300005];
void add(long long x, long long y, long long z) {
  target[++tot] = y;
  pre[tot] = last[x];
  last[x] = tot;
  w[tot] = z;
}
void dfs(long long x, long long fa, long long z) {
  if (z == 2) siz[x] = 1;
  if (z == 0 && x == n) {
    type[n] = 1;
    return;
  }
  for (long long i = last[x]; i; i = pre[i]) {
    long long tar = target[i];
    if (tar == fa) continue;
    if (z <= 1) deep[tar][z] = deep[x][z] + w[i];
    dfs(tar, x, z);
    if (z == 2) siz[x] += siz[tar];
    if (type[tar]) {
      type[x] = 1;
    }
  }
}
void dfs2(long long x, long long fa, long long z) {
  dis[x][z] = max(dis[x][z], deep[x][z]);
  if (!z) q[++q[0]] = x;
  for (long long i = last[x]; i; i = pre[i]) {
    long long tar = target[i];
    if (tar == fa) continue;
    if (type[tar])
      dis[tar][z] = dis[x][z], dfs2(tar, x, z);
    else
      dis[x][z] = max(deep[tar][z], dis[x][z]), ch[x] = tar;
  }
}
long long min(long long x, long long y) { return x < y ? x : y; }
long long max(long long x, long long y) { return x > y ? x : y; }
signed main() {
  long long x, y, z;
  scanf("%lld%lld", &n, &m);
  for (long long i = 1; i < n; i++)
    scanf("%lld%lld%lld", &x, &y, &z), add(x, y, z), add(y, x, z);
  dfs(1, 0, 0);
  dfs(n, 0, 1);
  for (long long i = 1; i <= n; i++)
    if (type[i])
      for (long long j = last[i]; j; j = pre[j])
        if (!type[target[j]]) dfs(target[j], i, 2), siz[i] += siz[target[j]];
  for (long long i = 1; i <= n; i++)
    if (type[i] && siz[i] >= 2) {
      for (long long i = 1; i <= m; i++) printf("%lld\n", deep[n][0]);
      return 0;
    }
  for (long long i = last[1]; i; i = pre[i])
    if (!type[target[i]]) dis[1][0] = deep[target[i]][0];
  for (long long i = last[n]; i; i = pre[i])
    if (!type[target[i]]) dis[n][1] = deep[target[i]][1];
  dfs2(1, 0, 0);
  dfs2(n, 0, 1);
  long long ans = 0;
  for (long long i = 2; i <= q[0]; i++) {
    if (ch[q[i]] || ch[q[i - 1]])
      ans = max(ans, dis[q[i]][1] + dis[q[i - 1]][0]);
    else if (i >= 3)
      ans = max(ans, dis[q[i - 2]][0] + dis[q[i]][1]);
  }
  for (long long i = 1; i <= m; i++) {
    scanf("%lld", &x);
    printf("%lld\n", min(ans + x, deep[n][0]));
  }
  return 0;
}
