#include <bits/stdc++.h>
using namespace std;
int n, las[501000], nxt[501000 * 2], to[501000 * 2], tot = 1, fa[501000],
                                                     p[501000], sz[501000];
long long dat[501000 * 2], ans = 214748364747654321ll, d[501000], mx = -ans;
void putin(int x, int y, int z) {
  nxt[++tot] = las[x];
  las[x] = tot;
  to[tot] = y;
  dat[tot] = z;
}
void dg(int x) {
  sz[x] = 1;
  if (x == n) p[x] = n + 1;
  for (int i = las[x]; i; i = nxt[i]) {
    int y = to[i];
    if (y == fa[x]) continue;
    fa[y] = x;
    d[y] = d[x] + dat[i];
    dg(y);
    sz[x] += sz[y];
    if (p[y] != 0) p[x] = y;
  }
  if (sz[x] - sz[p[x]] > 2) ans = 0;
}
void calc(int x) {
  if (x == n + 1) return;
  ans = min(ans, max(0ll, d[x] - mx));
  if (fa[x] != 0 && fa[x] != 1) ans = min(ans, max(0ll, d[x] - d[fa[fa[x]]]));
  for (int i = las[x]; i; i = nxt[i]) {
    int y = to[i];
    if (y == fa[x] || y == p[x]) continue;
    ans = min(ans, max(0ll, d[x] - mx - dat[i]));
    if (x > 1) ans = min(ans, max(0ll, d[x] - d[fa[x]] - dat[i]));
    mx = max(mx, d[y]);
  }
  if (p[x] > 0) calc(p[x]);
}
int main() {
  int ac;
  scanf("%d%d", &n, &ac);
  for (int i = 1; i <= n - 1; i++) {
    int x, y, z;
    scanf("%d%d%d", &x, &y, &z);
    putin(x, y, z);
    putin(y, x, z);
  }
  dg(1);
  if (ans > 0) calc(1);
  while (ac--) {
    long long x;
    scanf("%I64d", &x);
    printf("%I64d\n", min(d[n], d[n] - ans + x));
  }
}
