#include <bits/stdc++.h>
using namespace std;
class Solution {
 public:
  Solution(vector<vector<int>>& edges, int n)
      : N(n),
        graph(n),
        s(0),
        t(n - 1),
        sd(n, 0),
        td(n, 0),
        directConnected(false) {
    build(edges);
  }
  vector<long long> judge(vector<int>& roads) {
    int m = roads.size();
    vector<long long> res(m, INT_MIN);
    long long oldDis = sd[t];
    long long d = INT_MIN;
    vector<int> ord(N, 0);
    iota(ord.begin(), ord.end(), 0);
    sort(ord.begin(), ord.end(), [&](int l, int r) {
      return sd[l] - td[l] < sd[r] - td[r] ||
             (sd[l] - td[l] == sd[r] - td[r] && l < r);
    });
    vector<int> pos(N, 0);
    for (int i = 0; i < N; ++i) {
      pos[ord[i]] = i;
    }
    multiset<long long> mst;
    for (int i = 0; i < N; ++i) {
      mst.insert(td[i]);
    }
    for (int i = 0; i < N; ++i) {
      int u = ord[i];
      for (auto& e : graph[u]) {
        int v = e.first;
        if (pos[v] > i) {
          mst.erase(mst.find(td[v]));
        }
      }
      mst.erase(mst.find(td[u]));
      if (!mst.empty()) {
        d = max(d, min(oldDis, sd[u] + *mst.rbegin()));
      }
      for (auto& e : graph[u]) {
        int v = e.first;
        if (pos[v] > i) {
          mst.insert(td[v]);
        }
      }
    }
    for (int i = 0; i < m; ++i) {
      res[i] = min(oldDis, d + roads[i]);
    }
    return res;
  }

 private:
  int N;
  int s;
  int t;
  vector<vector<pair<int, int>>> graph;
  vector<long long> sd;
  vector<long long> td;
  bool directConnected;
  void build(vector<vector<int>>& edges) {
    for (auto& v : edges) {
      graph[v[0]].emplace_back(v[1], v[2]);
      graph[v[1]].emplace_back(v[0], v[2]);
    }
    calc(s, -1, 0, sd);
    calc(t, -1, 0, td);
  }
  void calc(int u, int p, long long d, vector<long long>& dis) {
    dis[u] = d;
    for (auto& e : graph[u]) {
      auto v = e.first;
      auto w = e.second;
      if (v == p) {
        continue;
      }
      calc(v, u, d + w, dis);
    }
  }
};
int main(int argc, char** argv) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, q;
  cin >> n >> q;
  vector<vector<int>> edges;
  edges.reserve(n);
  for (int i = 0, u = 0, v = 0, w = 0; i < n - 1; ++i) {
    cin >> u >> v >> w;
    edges.emplace_back(vector<int>{u - 1, v - 1, w});
  }
  Solution sol(edges, n);
  vector<int> projects(q);
  for (int i = 0; i < q; ++i) {
    cin >> projects[i];
  }
  auto res = sol.judge(projects);
  for (auto r : res) {
    cout << r << endl;
  }
  return 0;
}
