#include <bits/stdc++.h>
using namespace std;
template <class T1, class T2>
inline void upd1(T1& a, const T2& b) {
  if (a > b) a = b;
}
template <class T1, class T2>
inline void upd2(T1& a, const T2& b) {
  if (a < b) a = b;
}
template <class T>
inline bool equ(const T& a, const T& b) {
  return !memcmp(&a, &b, sizeof a);
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
struct ano {
  operator long long() {
    long long x = 0, y = 0, c = getchar();
    while (c < 48) y = c == 45, c = getchar();
    while (c > 47) x = x * 10 + c - 48, c = getchar();
    return y ? -x : x;
  }
} buf;
const int N = 3e5 + 5;
int p[N];
struct edge {
  int v, w;
};
vector<edge> t[N];
void dfs(int u) {
  for (auto s : t[u])
    if (s.v != p[u]) p[s.v] = u, dfs(s.v);
}
const long long inf = 1ll << 60;
int main() {
  int n = buf, q = buf;
  for (int i = 2; i <= n; ++i) {
    int u = buf, v = buf, w = buf;
    t[u].push_back({v, w});
    t[v].push_back({u, w});
  }
  dfs(1);
  vector<int> a;
  for (int i = n; i; i = p[i]) a.push_back(i);
  long long ans = -inf;
  long long sum = 0;
  vector<long long> g1, g2;
  auto cal = [&](int i) { return i == 0 || i == a.size() - 1 ? 2 : 3; };
  for (int i = 0; i < a.size(); ++i) {
    if (t[a[i]].size() > cal(i)) ans = inf;
    int w = 0;
    for (auto s : t[a[i]]) {
      int v = s.v;
      if ((i == 0 || v != a[i - 1]) && (i == a.size() - 1 || v != a[i + 1])) {
        if (t[v].size() > 1) ans = inf;
        w = s.w;
      }
      if (i != 0 && v == a[i - 1]) sum += s.w;
    }
    g1.push_back(w + sum);
    g2.push_back(w - sum);
  }
  for (int i = 1; i < g1.size(); ++i) {
    upd2(g1[i], g1[i - 1]);
    if (t[a[i]].size() == cal(i) || t[a[i - 1]].size() == cal(i - 1))
      upd2(ans, g2[i] + g1[i - 1]);
    else if (i >= 2)
      upd2(ans, g2[i] + g1[i - 2]);
  }
  while (q--) printf("%lld\n", sum + min(buf + ans, (long long)0));
}
