#include <bits/stdc++.h>
using namespace std;
int n, m;
pair<int, long long> aft[300000], farthest[300000], maxReach[300000][2];
int szof[300000];
vector<pair<int, long long>> adj[300000];
vector<int> onPath;
bool allset = 0;
void dfsFar(int node, int par) {
  szof[node] = 1;
  farthest[node].first = node;
  for (auto next : adj[node])
    if (next.first != par) {
      dfsFar(next.first, node);
      szof[node] += szof[next.first];
      if (farthest[next.first].second + next.second > farthest[node].second) {
        farthest[node].first = farthest[next.first].first;
        farthest[node].second = farthest[next.first].second + next.second;
      }
    }
}
bool dfs(int node, int par) {
  if (node == n - 1) {
    szof[node] = 1;
    farthest[node].first = n - 1;
    for (auto next : adj[node])
      if (next.first != par) {
        dfsFar(next.first, node);
        szof[node] += szof[next.first];
        pair<int, long long> op =
            make_pair(farthest[next.first].first,
                      farthest[next.first].second + next.second);
        if (op.second > farthest[node].second) farthest[node] = op;
      }
    if (szof[node] > 2) allset = 1;
    return 1;
  }
  for (auto next : adj[node])
    if (next.first != par)
      if (dfs(next.first, node)) {
        aft[node] = next;
        farthest[node].first = node;
        szof[node] = 1;
        for (auto next2 : adj[node])
          if (next2.first != par && next2.first != next.first) {
            dfsFar(next2.first, node);
            szof[node] += szof[next2.first];
            pair<int, long long> op =
                make_pair(farthest[next2.first].first,
                          farthest[next2.first].second + next2.second);
            if (op.second > farthest[node].second) farthest[node] = op;
          }
        if (szof[node] > 2) allset = 1;
        return 1;
      }
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < (n - 1); i++) {
    int u, v, w;
    cin >> u >> v >> w;
    u--, v--;
    adj[u].push_back(make_pair(v, w));
    adj[v].push_back(make_pair(u, w));
  }
  dfs(0, -1);
  long long origDis = 0;
  int curr = 0;
  while (curr != n - 1) {
    onPath.push_back(curr);
    origDis += aft[curr].second;
    curr = aft[curr].first;
  }
  onPath.push_back(curr);
  long long pathLen = 0;
  for (int i = 0; i < (((int)(onPath).size())); i++) {
    if (i) maxReach[i][0] = maxReach[i - 1][0];
    pair<int, long long> op = make_pair(farthest[onPath[i]].first,
                                        pathLen + farthest[onPath[i]].second);
    if (op.second > maxReach[i][0].second) maxReach[i][0] = op;
    if (i < ((int)(onPath).size()) - 1) pathLen += aft[onPath[i]].second;
  }
  pathLen = 0;
  for (int i = (((int)(onPath).size())) - 1; i >= 0; i--) {
    if (i < ((int)(onPath).size()) - 1)
      maxReach[i][1] = maxReach[i + 1][1];
    else
      maxReach[i][1].first = n - 1;
    pair<int, long long> op = make_pair(farthest[onPath[i]].first,
                                        pathLen + farthest[onPath[i]].second);
    if (op.second > maxReach[i][1].second) maxReach[i][1] = op;
    if (i) pathLen += aft[onPath[i - 1]].second;
  }
  long long maxOffset = 0;
  for (int i = 0; i < (((int)(onPath).size()) - 1); i++)
    if (maxReach[i][0].first != onPath[i] ||
        maxReach[i + 1][1].first != onPath[i + 1])
      maxOffset =
          max(maxOffset, maxReach[i][0].second + maxReach[i + 1][1].second);
  for (int i = 0; i < (((int)(onPath).size()) - 2); i++)
    maxOffset =
        max(maxOffset, maxReach[i][0].second + maxReach[i + 2][1].second);
  for (int i = 0; i < (m); i++) {
    long long x;
    cin >> x;
    if (origDis < maxOffset + x || allset)
      cout << origDis << "\n";
    else
      cout << maxOffset + x << "\n";
  }
}
