#include <bits/stdc++.h>
using namespace std;
struct edge {
  long long a, b, w;
};
long long n, m;
vector<vector<edge>> adjList;
deque<long long> path;
vector<bool> inPath;
long long dfs(long long x, long long c = 0, long long p = -1) {
  if (c == x) {
    inPath[c] = true;
    path.push_front(c);
    return 0;
  } else {
    for (auto e : adjList[c]) {
      if (e.b != p) {
        long long d = dfs(x, e.b, c);
        if (d >= 0) {
          inPath[c] = true;
          path.push_front(c);
          return d + e.w;
        }
      }
    }
    return -1;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> m;
  adjList = vector<vector<edge>>(n);
  for (long long i = 0; i < n - 1; i++) {
    long long a, b, w;
    cin >> a >> b >> w;
    a--;
    b--;
    adjList[a].push_back({a, b, w});
    adjList[b].push_back({b, a, w});
  }
  inPath = vector<bool>(n);
  long long dist = dfs(n - 1);
  bool ok = true;
  for (long long i = 0; i < n && ok; i++) {
    if (i == path[0] || i == path.back()) {
      ok &= adjList[i].size() <= 2;
    } else if (inPath[i]) {
      ok &= adjList[i].size() <= 3;
    } else {
      ok &= adjList[i].size() <= 1;
    }
  }
  long long offset;
  if (ok) {
    offset = 0;
    vector<long long> spike(path.size());
    vector<long long> next(path.size() - 1);
    for (long long i = 0; i < path.size(); i++) {
      for (auto n : adjList[path[i]]) {
        if (!inPath[n.b]) {
          spike[i] = n.w;
        } else if (i + 1 < path.size() && n.b == path[i + 1]) {
          next[i] = n.w;
        }
      }
    }
    for (long long i = 0; i + 1 < path.size(); i++) {
      if (spike[i] > 0 || spike[i + 1] > 0) {
        offset = max(offset, dist - next[i] + spike[i] + spike[i + 1]);
      }
    }
    for (long long i = 0; i + 1 < next.size(); i++) {
      offset = max(offset, dist - next[i] - next[i + 1]);
    }
  } else {
    offset = dist;
  }
  for (long long i = 0; i < m; i++) {
    long long x;
    cin >> x;
    cout << min(dist, offset + x) << endl;
  }
}
