#include <bits/stdc++.h>
using namespace std;
const int N = 200001;
vector<int> g[N];
int dp[N][2];
pair<long long, long long> dfs(int node, int par) {
  int ans = 0, equal = 0;
  pair<int, int> p;
  for (int i = 0; i < g[node].size(); i++)
    if (g[node][i] != par) {
      p = dfs(g[node][i], node);
      equal += p.first == p.second;
      ans += p.second;
    }
  long long f = 0, s = 0;
  s = ans + 1 - min(equal, 2);
  f = ans + 1 - min(equal, 1);
  return make_pair(f, s);
}
int main() {
  int n, x, y;
  cin >> n >> x >> y;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    g[--u].push_back(--v);
    g[v].push_back(u);
  }
  if (x <= y) {
    int mini = dfs(0, 0).second;
    long long ans = 1LL * (mini - 1) * y + 1LL * (n - mini) * x;
    return cout << ans << endl, 0;
  }
  for (int i = 0; i < n; i++)
    if (g[i].size() == n - 1) return cout << (1LL * n - 2) * y + x << endl, 0;
  cout << (1LL * n - 1) * y << endl, 0;
}
