#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 2e5 + 22;
long long n, x, y;
long long dp[4][MAXN];
vector<long long> G[MAXN];
void dfs(long long v, long long par = n) {
  vector<long long> vec;
  for (long long u : G[v]) {
    if (u == par) continue;
    dfs(u, v);
    dp[0][v] += dp[3][u];
  }
  for (long long u : G[v]) {
    if (u == par) continue;
    dp[1][v] = max(dp[1][v], dp[0][v] - dp[3][u] + max(dp[0][u], dp[1][u]) + 1);
    vec.push_back(dp[3][u] - max(dp[0][u], dp[1][u]));
  }
  if (vec.size() > 1) {
    sort(vec.begin(), vec.end());
    dp[2][v] = dp[0][v] - vec[0] - vec[1] + 2;
  }
  dp[3][v] = max(max(dp[0][v], dp[1][v]), dp[2][v]);
}
int32_t main() {
  cin >> n >> x >> y;
  for (long long i = 0, p, q; i < n - 1; i++) {
    cin >> p >> q;
    p--, q--;
    G[p].push_back(q);
    G[q].push_back(p);
  }
  if (y < x) {
    for (long long i = 0; i < n; i++)
      if (G[i].size() == n - 1) return cout << (long long)(n - 2) * y + x, 0;
    cout << (long long)(n - 1) * y;
    return 0;
  }
  dfs(0);
  cout << (long long)(n - 1 - dp[3][0]) * y + dp[3][0] * x;
  return 0;
}
