#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 3e5 + 4;
long long d1[N], dn[N];
int src;
vector<pair<int, int>> v[N];
void dfs(int node, int par) {
  for (auto it : v[node]) {
    int x = it.first, wt = it.second;
    if (x == par) continue;
    if (src == 1)
      d1[x] = d1[node] + wt;
    else
      dn[x] = dn[node] + wt;
    dfs(x, node);
  }
}
bool comp(int a, int b) { return d1[a] - dn[a] < d1[b] - dn[b]; }
int main() {
  int n, q;
  scanf("%d", &n);
  scanf("%d", &q);
  for (int i = 0; i < n - 1; i++) {
    int a, b, wt;
    scanf("%d", &a);
    scanf("%d", &b);
    scanf("%d", &wt);
    v[a].emplace_back(b, wt);
    v[b].emplace_back(a, wt);
  }
  src = 1;
  dfs(1, -1);
  src = n;
  dfs(n, -1);
  vector<int> vv;
  for (int i = 1; i < n + 1; i++) vv.push_back(i);
  sort(vv.begin(), vv.end(), comp);
  set<pair<long long, int>> st;
  for (int i = 1; i < n + 1; i++) st.emplace(dn[i], i);
  long long mx = 0;
  for (int x : vv) {
    st.erase(make_pair(dn[x], x));
    vector<pair<long long, int>> removed;
    for (auto it : v[x])
      if (st.find(make_pair(dn[it.first], it.first)) != st.end())
        st.erase(make_pair(dn[it.first], it.first)),
            removed.push_back(make_pair(dn[it.first], it.first));
    if (st.size()) {
      long long here = d1[x] + st.rbegin()->first;
      mx = max(mx, here);
    }
    for (auto it : removed) st.insert(it);
  }
  while (q--) {
    int wt;
    scanf("%d", &wt);
    long long ans = min(d1[n], mx + wt);
    printf("%lld\n", ans);
  }
  return 0;
}
