#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
const double PI = acos((long double)-1.0);
const double EPS = 1e-10;
const int MOD = 1e9 + 7;
template <typename T>
void cmin(T &x, T y) {
  if (y < x) x = y;
}
template <typename T>
void cmax(T &x, T y) {
  if (y > x) x = y;
}
long long qpow(long long x, long long n, long long mod = MOD) {
  if (n < 0) return 0;
  long long res = 1;
  while (n) {
    if (n & 1) res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}
long long sq(long long x) { return x * x; }
double sq(double x) { return x * x; }
long long read() {
  long long res = 0;
  char c = getchar();
  while (!isdigit(c)) c = getchar();
  while (isdigit(c)) {
    res = res * 10 + (c - '0');
    c = getchar();
  }
  return res;
}
namespace Solver {
void InitOnce() { int t; }
int n, x, y;
vector<int> G[200005];
void Read() {
  int res = scanf("%d%d%d", &n, &x, &y);
  if (res == -1) exit(0);
}
int dp[200005][3];
void dfs(int u, int p) {
  int cntson = 0;
  for (int v : G[u]) {
    if (v == p) continue;
    ++cntson;
  }
  if (cntson == 0) {
    dp[u][0] = 1;
    dp[u][1] = 1;
    dp[u][2] = 1;
  } else {
    int sumdpv2 = 0;
    vector<int> vec;
    for (int v : G[u]) {
      if (v == p) continue;
      dfs(v, u);
      sumdpv2 += dp[v][2];
      vec.emplace_back(dp[v][1] - dp[v][2]);
    }
    sort(vec.begin(), vec.end());
    dp[u][0] = sumdpv2 + 1;
    dp[u][1] = sumdpv2 + vec[0];
    dp[u][2] = INF;
    if (vec.size() >= 2) dp[u][2] = sumdpv2 + vec[0] + vec[1] - 1;
  }
  dp[u][1] = min(dp[u][1], dp[u][0]);
  dp[u][2] = min(dp[u][2], dp[u][1]);
  return;
}
void Solve() {
  for (int i = 1; i <= n; ++i) G[i].clear();
  for (int i = 1; i <= n - 1; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    G[u].emplace_back(v);
    G[v].emplace_back(u);
  }
  if (x >= y) {
    bool ok = 1;
    for (int i = 1; i <= n; ++i) {
      if (G[i].size() >= n - 1) {
        ok = 0;
        break;
      }
    }
    long long ans = 1LL * (n - 1) * y;
    if (!ok) ans = ans - y + x;
    printf("%lld\n", ans);
    return;
  } else {
    dfs(1, 0);
    int len = dp[1][2];
    long long ans = 1LL * (len - 1) * y + 1LL * (n - 1 - (len - 1)) * x;
    printf("%lld\n", ans);
    return;
  }
}
}  // namespace Solver
int main() {
  Solver::InitOnce();
  while (true) {
    Solver::Read();
    Solver::Solve();
  }
  return 0;
}
