#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200010;
vector<int> fo[MAXN];
int n, x, y;
set<pair<int, int> > edj;
vector<int> d0, d1;
void Dfs(int vr, int par = -1, int side = 0) {
  if (side == 0)
    d0.push_back(vr);
  else
    d1.push_back(vr);
  if (par != -1) fo[vr].erase(find(fo[vr].begin(), fo[vr].end(), par));
  for (int i = 0; i < ((int)(fo[vr]).size()); ++i) Dfs(fo[vr][i], vr, side ^ 1);
}
int dp1[MAXN], dp0[MAXN];
int Eval0(int vr);
int Eval1(int vr);
int Eval0(int vr) {
  if (dp0[vr] >= 0) return dp0[vr];
  int& val = dp0[vr];
  val = Eval1(vr);
  int below = 0;
  for (int i = 0; i < ((int)(fo[vr]).size()); ++i) below += Eval0(fo[vr][i]);
  set<pair<int, int> > nal;
  for (int i = 0; i < ((int)(fo[vr]).size()); ++i) {
    int diff = Eval1(fo[vr][i]) - Eval0(fo[vr][i]);
    nal.insert(make_pair(diff, fo[vr][i]));
  }
  for (int i = 0; i < ((int)(fo[vr]).size()); ++i) {
    int my_diff = Eval1(fo[vr][i]) - Eval0(fo[vr][i]);
    nal.erase(make_pair(my_diff, fo[vr][i]));
    if (!nal.empty()) {
      int cur = below + my_diff;
      cur += (nal.begin())->first;
      --cur;
      (val) = min((val), (cur));
    }
  }
  return val;
}
int Eval1(int vr) {
  if (dp1[vr] >= 0) return dp1[vr];
  int& val = dp1[vr];
  val = 1E9;
  int below = 0;
  for (int i = 0; i < ((int)(fo[vr]).size()); ++i) below += Eval0(fo[vr][i]);
  (val) = min((val), (1 + below));
  for (int i = 0; i < ((int)(fo[vr]).size()); ++i) {
    int cur = below - Eval0(fo[vr][i]) + Eval1(fo[vr][i]);
    (val) = min((val), (cur));
  }
  return val;
}
int main() {
  memset(dp1, -1, sizeof dp1);
  memset(dp0, -1, sizeof dp0);
  scanf("%d%d%d", &n, &x, &y);
  for (int i = 1; i < n; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    --u, --v;
    fo[u].push_back(v), fo[v].push_back(u);
    edj.insert(make_pair(u, v));
    edj.insert(make_pair(v, u));
  }
  if (x == y) {
    cout << (n - 1) * 1LL * x << '\n';
    return 0;
  }
  Dfs(0);
  if (x > y) {
    bool has_edj = false;
    for (int i = 0; i < ((int)(d0).size()); ++i)
      for (int j = 0; j < ((int)(d1).size()); ++j)
        if (!edj.count(make_pair(d0[i], d1[j]))) {
          has_edj = true;
          break;
        }
    long long ans = 0;
    if (has_edj)
      ans = (n - 1) * 1LL * y;
    else
      ans = (n - 2) * 1LL * y + x;
    cout << ans << '\n';
    return 0;
  }
  int min_paths = min(Eval0(0), Eval1(0));
  long long ty = min_paths - 1;
  long long tx = n - 1 - ty;
  long long out = tx * x + ty * y;
  cout << out << '\n';
  return 0;
}
