#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:256000000")
using namespace std;
mt19937 ggen;
long long n, x, y;
vector<vector<int> > g;
int d[200010];
vector<int> l;
void dfs1(int v, int p) {
  d[v] = d[p] + 1;
  for (int i = 0; i < g[v].size(); i++) {
    int to = g[v][i];
    if (to != p) dfs1(to, v);
  }
}
int f[200010][2];
int dyn(int v, int p, int can) {
  if (f[v][can] != -1) return f[v][can];
  int res = 0;
  vector<pair<int, int> > vars;
  for (int i = 0; i < g[v].size(); i++) {
    int to = g[v][i];
    if (to != p)
      vars.push_back(pair<int, int>(dyn(to, v, 1) - dyn(to, v, 0), to));
  }
  sort(vars.begin(), vars.end());
  int conn1 = -1, conn2 = -1;
  if (can && vars.size() >= 2) {
    conn1 = vars[0].second;
    conn2 = vars[1].second;
    res = 2 + dyn(vars[0].second, v, 0) + dyn(vars[1].second, v, 0);
  } else if (vars.size()) {
    conn1 = vars[0].second;
    res = 1 + dyn(vars[0].second, v, 0);
  }
  for (int i = 0; i < g[v].size(); i++) {
    int to = g[v][i];
    if (to != p && to != conn1 && to != conn2) res += dyn(to, v, 1);
  }
  if (can) res = max(res, dyn(v, p, 0));
  return f[v][can] = res;
}
void solve() {
  scanf("%I64d%I64d%I64d", &n, &x, &y);
  g.resize(n + 1);
  for (int i = 0; i < n - 1; i++) {
    int f, t;
    scanf("%d%d", &f, &t);
    g[f].push_back(t);
    g[t].push_back(f);
  }
  d[0] = -1;
  dfs1(1, 0);
  for (int i = 1; i <= n; i++)
    if (d[i] & 1) l.push_back(i);
  if (x >= y) {
    if (l.size() == 1 || l.size() == (n - 1))
      cout << (n - 2) * y + x;
    else
      cout << (n - 1) * y;
  } else {
    memset(f, -1, sizeof f);
    long long t = dyn(1, 0, 1);
    cout << t * x + (n - 1 - t) * y;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  srand(88);
  ggen = mt19937(88);
  solve();
  return 0;
}
