#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> g;
vector<set<int>> gs;
void rec(int v, int p) {
  vector<int> tmp(gs[v].size());
  int j = 0;
  for (auto i = gs[v].begin(); i != gs[v].end(); ++i) {
    tmp[j] = *i;
    ++j;
  }
  for (int i = 0; i < tmp.size(); ++i) {
    if (tmp[i] != p) {
      rec(tmp[i], v);
    }
  }
  if (gs[v].size() > 2) {
    if (p != -1 && gs[p].size() > 2) {
      gs[v].erase(p);
      gs[p].erase(v);
    }
    while (gs[v].size() > 2) {
      int q = *gs[v].begin();
      gs[v].erase(q);
      gs[q].erase(v);
    }
  }
  assert(gs[v].size() <= 2);
}
int main(int argc, char* argv[]) {
  std::ios::sync_with_stdio(false);
  long long n, x, y;
  cin >> n >> x >> y;
  g.resize(n);
  gs.resize(n);
  for (int i = 0; i < n - 1; ++i) {
    int f, t;
    cin >> f >> t;
    --f;
    --t;
    g[f].push_back(t);
    g[t].push_back(f);
    gs[f].insert(t);
    gs[t].insert(f);
  }
  if (x >= y) {
    int mi = 0;
    for (int i = 0; i < g.size(); ++i) {
      if (g[i].size() == n - 1) {
        mi = 1;
        break;
      }
    }
    cout << y * (n - 1 - mi) + mi * x << endl;
    return 0;
  }
  long long connect = 0;
  rec(0, -1);
  for (int i = 0; i < gs.size(); ++i) {
    connect += gs[i].size();
  }
  long long use = connect / 2;
  cout << use * x + (n - use - 1) * y << endl;
  return 0;
}
