#include <bits/stdc++.h>
using namespace std;
class Solution {
 public:
  Solution(vector<vector<int>>& edges, int n)
      : N(n),
        graph(n),
        parents(n, -1),
        dis(n, 0),
        size(n, 0),
        pre(n, 0),
        post(n, 0),
        s(0),
        t(n - 1),
        clock(0),
        minDiff(INT_MAX) {
    build(edges);
    preprocess();
  }
  vector<long long> judge(vector<int>& roads) {
    vector<long long> res;
    res.reserve(roads.size());
    for (auto r : roads) {
      res.emplace_back(min(dis[t], dis[t] - minDiff + r));
    }
    return res;
  }

 private:
  int N;
  int s;
  int t;
  int clock;
  vector<vector<pair<int, int>>> graph;
  vector<int> parents;
  vector<long long> dis;
  vector<int> size;
  vector<int> pre;
  vector<int> post;
  long long minDiff;
  void build(vector<vector<int>>& edges) {
    for (auto& e : edges) {
      int u = e[0], v = e[1], w = e[2];
      graph[u].emplace_back(v, w);
      graph[v].emplace_back(u, w);
    }
    calc(s, -1, 0);
  }
  void calc(int u, int p, long long d) {
    parents[u] = p;
    dis[u] = d;
    pre[u] = ++clock;
    size[u] = 1;
    for (auto& e : graph[u]) {
      int v = e.first;
      int w = e.second;
      if (v == p) {
        continue;
      }
      calc(v, u, d + w);
      size[u] += size[v];
    }
    post[u] = ++clock;
  }
  bool isParent(int u, int v) { return pre[u] < pre[v] && post[v] < post[u]; }
  void preprocess() {
    if (size[t] >= 3) {
      minDiff = 0;
      return;
    }
    int node = t;
    vector<int> path;
    while (node != -1) {
      path.push_back(node);
      int p = parents[node];
      if (p != -1) {
        if (size[p] - size[node] >= 3) {
          minDiff = 0;
          return;
        }
      }
      node = p;
    }
    reverse(path.begin(), path.end());
    long long mx = INT_MIN;
    for (auto u : path) {
      minDiff = min(minDiff, max(0LL, -(mx - dis[u])));
      int p = parents[u];
      if (p != -1 && parents[p] != -1) {
        minDiff = min(minDiff, max(0LL, dis[u] - dis[parents[p]]));
      }
      for (auto& e : graph[u]) {
        int v = e.first;
        int w = e.second;
        if (v == p) {
          continue;
        }
        if (isParent(v, t) || v == t) {
          continue;
        }
        minDiff = min(minDiff, max(0LL, dis[u] - (mx + w)));
        mx = max(mx, dis[u] + w);
        if (p != -1) {
          minDiff = min(minDiff, max(0LL, dis[u] - (dis[p] + w)));
        }
      }
    }
  }
};
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;
}
