#include <bits/stdc++.h>
using namespace std;
long long const N = 2e5 + 20;
long long n, x, y, ans;
vector<long long> adj[N];
bool dfs(long long v, long long par = -1) {
  long long cnt = 0;
  for (auto u : adj[v])
    if (u != par) cnt += dfs(u, v);
  if (!cnt) return 1;
  if (cnt == 1) {
    ans++;
    return 1;
  }
  ans += 2;
  return 0;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> x >> y;
  bool star = 0;
  for (long long i = 0; i < n - 1; i++) {
    long long u, v;
    cin >> u >> v;
    u--, v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
    star |= ((long long)adj[u].size() == n - 1) ||
            ((long long)adj[v].size() == n - 1);
  }
  if (x > y) {
    if (star)
      cout << (n - 2) * y + x << '\n';
    else
      cout << (n - 1) * y << '\n';
    return 0;
  }
  dfs(0);
  cout << ans * x + (n - 1 - ans) * y << '\n';
}
