#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
const int inf = (int)1e9;
const long long mod = (int)1e9 + 7;
const long long l_inf = (long long)4e18;
int n, x, y;
vector<int> g[maxn];
int dp[maxn][2];
void case_1() {
  bool found = false;
  for (int i = 0; i < n; i++) found |= (int)g[i].size() == n - 1;
  if (found) {
    cout << (n - 2) * 1ll * y + x;
  } else {
    cout << (n - 1) * 1ll * y;
  }
  exit(0);
}
void dfs(int v, int p = -1) {
  int sum0 = 0, cnt = 0;
  for (int u : g[v]) {
    if (u == p) continue;
    dfs(u, v);
    sum0 += min(dp[u][0], dp[u][1]);
    if (dp[u][1] <= dp[u][0]) cnt++;
  }
  if (cnt == 0) {
    dp[v][0] = sum0 + 1;
    dp[v][1] = sum0 + 1;
  }
  if (cnt == 1) {
    dp[v][0] = sum0;
    dp[v][1] = sum0;
  }
  if (cnt >= 2) {
    dp[v][0] = sum0 - 1;
    dp[v][1] = sum0;
  }
}
void case_2() {
  dfs(0);
  int cnt = min(dp[0][0], dp[0][1]);
  cout << (cnt - 1) * 1ll * y + (n - cnt) * 1ll * x;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> x >> y;
  for (int i = 0; i < n - 1; i++) {
    int v, u;
    cin >> v >> u;
    v--, u--;
    g[v].push_back(u);
    g[u].push_back(v);
  }
  if (x > y) {
    case_1();
  } else {
    case_2();
  }
  return 0;
}
