#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
int n, m, x, pbcount, bcount;
vector<int> mainpath;
bool onmain[N];
vector<pair<int, int>> e[N];
int64_t od[N], dpath[N], maxhh, maxhp, ppmaxhh, pmaxhh;
bool dfs0(int i, int p) {
  if (i == 1) {
    mainpath.push_back(1);
    return 1;
  }
  for (auto& x : e[i])
    if (x.first != p && dfs0(x.first, i)) {
      mainpath.push_back(i);
      onmain[i] = 1;
      od[i] = od[x.first] + x.second;
      return 1;
    }
  return 0;
}
int64_t dfs(int i, int p = 0) {
  int64_t rt = 0;
  ++bcount;
  for (auto& x : e[i])
    if (x.first != p && !onmain[x.first]) {
      rt = max(rt, dfs(x.first, i) + x.second);
    }
  return rt;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n - 1; ++i) {
    int s, t, w;
    scanf("%d%d%d", &s, &t, &w);
    e[s].emplace_back(t, w);
    e[t].emplace_back(s, w);
  }
  dfs0(n, 0);
  onmain[1] = 1;
  for (int i = 0; i < mainpath.size(); ++i) {
    bcount = -1;
    auto blength = dfs(mainpath[i]);
    if (bcount > 1) {
      for (int i = 0; i < m; ++i) printf("%lld\n", od[n]);
      return 0;
    }
    if (i) {
      if (bcount || pbcount)
        maxhp = max(maxhp, maxhh + od[n] - od[mainpath[i]] + blength);
      else if (i > 1)
        maxhp = max(maxhp, ppmaxhh + od[n] - od[mainpath[i]] + blength);
    }
    maxhh = max(maxhh, od[mainpath[i]] + blength);
    pbcount = bcount;
    ppmaxhh = pmaxhh;
    pmaxhh = maxhh;
  }
  for (int i = 0; i < m; ++i)
    scanf("%d", &x), printf("%lld\n", min(od[n], maxhp + x));
}
