#include <bits/stdc++.h>
using namespace std;
long long n, x, y, ans;
int stat[200030], deg[200030];
vector<int> adj[200030];
bool star() {
  for (int i = 1; i <= n; ++i)
    if (deg[i] == n - 1) return true;
  return false;
}
bool solve(int u, int p = -1) {
  int cont = 0;
  for (int v : adj[u])
    if (v != p) {
      cont += solve(v, u);
    }
  if (cont == 0) return true;
  if (cont == 1) {
    ans++;
    return true;
  }
  ans += 2;
  return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int a, b;
  memset(deg, 0, sizeof(deg));
  cin >> n >> x >> y;
  for (int i = int(0); i < int(n - 1); ++i) {
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
    deg[a]++;
    deg[b]++;
  }
  if (y <= x) {
    if (star())
      cout << (n - 2) * y + x << endl;
    else
      cout << (n - 1) * y << endl;
  } else {
    ans = 0;
    solve(1);
    cout << ((n - 1 - ans) * y + ans * x) << endl;
  }
  return 0;
}
