#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
int n;
vector<pair<long long, long long> > adj[N];
vector<pair<long long, long long> > path;
set<int> inPath;
bool dfs(int v, int p, int wt) {
  path.emplace_back(v, wt);
  if (v == n) return true;
  for (auto it : adj[v]) {
    if (it.first == p) continue;
    if (dfs(it.first, v, it.second)) return true;
  }
  path.pop_back();
  return false;
}
vector<int> rm;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int m;
  cin >> n >> m;
  for (int i = 1; i < n; i++) {
    int a, b, w;
    cin >> a >> b >> w;
    adj[a].emplace_back(b, w);
    adj[b].emplace_back(a, w);
  }
  dfs(1, 0, 0);
  int len = path.size();
  for (auto it : path) {
    inPath.insert(it.first);
  }
  bool done = false;
  for (auto it : path) {
    int ok = (it.first == 1 || it.first == n);
    if ((int)adj[it.first].size() >= 4 - ok) {
      done = true;
      break;
    }
    if ((int)adj[it.first].size() == 3 - ok) {
      for (auto j : adj[it.first]) {
        if (inPath.find(j.first) == inPath.end()) {
          if ((int)adj[j.first].size() >= 2) {
            done = true;
            break;
          }
          rm.push_back(j.second);
          break;
        }
      }
      if (done) break;
    } else
      rm.push_back(0);
  }
  for (int i = 1; i < len; i++) {
    path[i].second += path[i - 1].second;
  }
  if (done) {
    long long ans = path[len - 1].second;
    while (m--) {
      int x;
      cin >> x;
      cout << ans << "\n";
    }
    return 0;
  }
  long long ans = 1e18;
  long long mx = path[0].second + rm[0];
  long long mx2 = -1e18;
  if (rm[0]) mx2 = mx;
  for (int i = 1; i < len; i++) {
    if (rm[i] == 0) {
      ans = min(ans, path[i].second - mx2);
    } else {
      ans = min(ans, path[i].second - rm[i] - mx);
      mx2 = max(mx2, path[i].second + rm[i]);
    }
    mx2 = max(mx2, path[i - 1].second + rm[i - 1]);
    mx = max(mx, path[i].second + rm[i]);
  }
  while (m--) {
    int x;
    cin >> x;
    cout << min(path[len - 1].second, path[len - 1].second - ans + x) << "\n";
  }
  return 0;
}
