#include <bits/stdc++.h>
using namespace std;
vector<int> adj[200200];
int n;
long long x, y;
int a, b;
long long dp[200200][2];
void dfs(int nd, int p) {
  for (int i = 0; i < adj[nd].size(); i++) {
    int ch = adj[nd][i];
    if (ch == p) continue;
    dfs(ch, nd);
  }
  dp[nd][0] = y;
  dp[nd][1] = 0;
  long long mn = 1ll << 60, mn2 = 1ll << 60;
  for (int i = 0; i < adj[nd].size(); i++) {
    int ch = adj[nd][i];
    if (ch == p) continue;
    dp[nd][1] += dp[ch][0];
    dp[nd][0] += dp[ch][0];
    if (-dp[ch][0] + dp[ch][1] + x < mn2) {
      mn2 = -dp[ch][0] + dp[ch][1] + x;
    }
    if (mn2 < mn) {
      swap(mn2, mn);
    }
  }
  if (mn < 0) {
    dp[nd][1] += mn;
  }
  if (mn + mn2 < 0) {
    dp[nd][0] += mn + mn2;
  }
  dp[nd][0] = min(dp[nd][0], dp[nd][1] + y);
}
int main() {
  cin.sync_with_stdio(false);
  cin >> n >> x >> y;
  for (int i = 1; i < n; i++) {
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  if (y < x) {
    bool ok = false;
    for (int i = 1; i <= n; i++) {
      if (adj[i].size() == n - 1) {
        ok = true;
      }
    }
    if (ok) {
      cout << y * (n - 2) + x << endl;
    } else {
      cout << y * (n - 1) << endl;
    }
    return 0;
  }
  dfs(1, 1);
  cout << min(dp[1][1], dp[1][0] - y) << endl;
}
