#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void smax(T &a, const U &b) {
  if (a < b) a = b;
}
vector<pair<int, int> > adj[300300];
int vst[300300], pa[300300], n, m;
long long dp[300300], val[300300];
void dfs(int u, int fa = 0) {
  for (int i = adj[u].size(); i--;) {
    int v = adj[u][i].first, w = adj[u][i].second;
    if (v != fa) {
      dp[v] = dp[u] + w;
      pa[v] = u;
      dfs(v, u);
    }
  }
}
bool check(int u) {
  vst[u] = 1;
  if (u == 1 || u == n)
    if (adj[u].size() > 2) return true;
  if (adj[u].size() > 3) return true;
  return false;
}
long long solve() {
  long long ans = -1000000000000009LL, tmp = -1000000000000009LL;
  for (int u = n, pre = -1;; u = pa[u]) {
    if (check(u)) return 1000000000000009LL;
    for (int i = adj[u].size(); i--;) {
      int v = adj[u][i].first;
      if (!vst[v] && v != pa[u]) {
        if (adj[v].size() > 1) return 1000000000000009LL;
        val[u] = adj[u][i].second;
        break;
      }
    }
    if (~pre && (val[u] || val[pre])) {
      smax(ans, val[u] + val[pre] - dp[pre] + dp[u]);
    }
    if (u == 1) break;
    if (~pre) smax(ans, dp[pa[u]] - dp[pre]);
    pre = u;
  }
  return ans;
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1, u, v, w; i < n; i++) {
    scanf("%d %d %d", &u, &v, &w);
    adj[u].push_back(pair<int, int>(v, w));
    adj[v].push_back(pair<int, int>(u, w));
  }
  dfs(1);
  long long tmp = solve();
  while (m--) {
    int first;
    scanf("%d", &first);
    if (first + tmp >= 0)
      printf("%I64d\n", dp[n]);
    else
      printf("%I64d\n", dp[n] + first + tmp);
  }
}
