#include <bits/stdc++.h>
using namespace std;
int n, m;
int v[300005];
long long dis[300006];
long long dis2[300005];
long long nxt[300005];
long long maxn[300005];
long long maxn2[300005];
long long an;
bool t;
vector<int> q[300005];
vector<long long> l[300005];
void back(int x, int father) {
  for (int i = 0; i < q[x].size(); i++) {
    int nx = q[x][i];
    if (nx == father) continue;
    dis2[nx] = dis2[x] + l[x][i];
    back(nx, x);
  }
}
bool dfs(int x, int father) {
  bool ok = 0;
  v[x]++;
  if (x == n) {
    ok = 1;
  }
  for (int i = 0; i < q[x].size(); i++) {
    int nx = q[x][i];
    if (nx == father) continue;
    dis[nx] = dis[x] + l[x][i];
    bool op = dfs(nx, x);
    if (op) nxt[x] = nx;
    if (op == 0) v[x] += v[nx];
    ok |= op;
  }
  if (v[x] > 2) t = 1;
  maxn[x] = dis[x];
  maxn2[x] = dis2[x];
  for (int i = 0; i < q[x].size(); i++) {
    int nx = q[x][i];
    maxn2[x] = max(maxn2[x], maxn2[nx]);
    if (nx == nxt[x]) continue;
    maxn[x] = max(maxn[x], maxn[nx]);
  }
  if (x != n) {
    if (v[x] > 1 || v[nxt[x]] > 1) {
      an = max(an, maxn[x] + maxn2[nxt[x]]);
    } else if (nxt[nxt[x]] != 0)
      an = max(an, maxn[x] + maxn2[nxt[nxt[x]]]);
  }
  return ok;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n; i++) {
    int x, y;
    long long z;
    scanf("%d%d%lld", &x, &y, &z);
    q[x].push_back(y);
    q[y].push_back(x);
    l[x].push_back(z);
    l[y].push_back(z);
  }
  back(n, n);
  dfs(1, 1);
  for (int i = 1; i <= m; i++) {
    long long k;
    scanf("%lld", &k);
    if (k + an > dis2[1] || t == 1)
      printf("%lld\n", dis2[1]);
    else
      printf("%lld\n", an + k);
  }
  return 0;
}
