#include <bits/stdc++.h>
using namespace std;
const long long MAX_N = 2e5 + 10;
long long n, x, y, ans;
vector<int> G[MAX_N];
int dfs(int v, int p) {
  int tmp = 0;
  for (int u : G[v])
    if (u != p) tmp += dfs(u, v);
  if (tmp <= 1) return 1;
  ans += tmp - 1;
  return 0;
}
int main() {
  cin >> n >> x >> y;
  for (int i = 0; i < n - 1; i++) {
    int v, u;
    cin >> v >> u;
    v--, u--;
    G[v].push_back(u);
    G[u].push_back(v);
  }
  if (y < x) {
    bool bad = false;
    for (int i = 0; i < n; i++) bad |= (G[i].size() == n - 1);
    if (bad) {
      cout << (n - 2) * y + x << "\n";
      return 0;
    }
    x = y;
  }
  ans += dfs(0, 0);
  cout << (ans - 1) * y + (n - ans) * x << "\n";
  return 0;
}
