#include <bits/stdc++.h>
using namespace std;
using ll = long long;
mt19937 rng(1234);
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, x, y;
  cin >> n >> x >> y;
  vector<vector<int>> g(n);
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    cin >> u >> v;
    --u, --v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  int mx = 0;
  for (int i = 0; i < n; ++i) mx = max<int>(mx, g[i].size());
  if (y <= x) {
    if (mx == n - 1) {
      cout << 1LL * y * (n - 2) + x;
    } else {
      cout << 1LL * y * (n - 1);
    }
  } else {
    int tr = 0;
    function<bool(int, int)> dfs = [&](int v, int pr) {
      int children = 0;
      for (auto to : g[v]) {
        if (to != pr) {
          children += dfs(to, v);
        }
      }
      tr += max(0, children - 1 - (v == 0));
      return (children < 2);
    };
    dfs(0, -1);
    cout << 1LL * (n - 1 - tr) * x + 1LL * tr * y;
  }
}
