#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 10;
long long n, x, y, dp[N][2];
vector<long long> adj[N];
void dfs(long long v, long long p) {
  long long sum = 0;
  for (long long u : adj[v])
    if (u != p) {
      dfs(u, v);
      sum += min(dp[u][0], dp[u][1]);
    }
  sort(adj[v].begin(), adj[v].end(), [&](long long a, long long b) {
    return dp[a][1] - min(dp[a][0], dp[a][1]) <
           dp[b][1] - min(dp[b][0], dp[b][1]);
  });
  if (v) assert(adj[v].back() == p);
  if ((!v && adj[v].size() > 1) || (v && adj[v].size() > 2)) {
    long long a = adj[v][0], b = adj[v][1];
    dp[v][0] = min(sum + 1, sum + dp[a][1] - min(dp[a][0], dp[a][1]) +
                                dp[b][1] - min(dp[b][0], dp[b][1]) - 1);
  } else
    dp[v][0] = sum + 1;
  if ((!v && adj[v].size()) || (v && adj[v].size() > 1)) {
    long long a = adj[v][0];
    dp[v][1] = min(sum + 1, sum + dp[a][1] - min(dp[a][0], dp[a][1]));
  } else
    dp[v][1] = sum + 1;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  for (long long i = 0; i < N; i++) dp[i][1] = N;
  cin >> n >> x >> y;
  for (long long i = 1; i < n; i++) {
    long long v, u;
    cin >> v >> u;
    v--;
    u--;
    adj[v].push_back(u);
    adj[u].push_back(v);
  }
  if (x >= y) {
    for (long long i = 0; i < n; i++)
      if (adj[i].size() == n - 1) return cout << x + (n - 2) * y, 0;
    return cout << (n - 1) * y, 0;
  }
  dfs(0, 0);
  long long tmp = min(dp[0][0], dp[0][1]);
  cout << (tmp - 1) * y + (n - tmp) * x;
}
